{% extends "chatkit/base.html" %} {% block title %}ChatKit · Manage Friends{% endblock %} {% block sidebar %}
Back to Chat

Quick Stats

Friends {{ friends|length }}
Pending Requests {{ received_requests|length }}
Sent Requests {{ sent_requests|length }}
{% endblock %} {% block content %}

Manage Friends

Connect with friends and manage your network

{% if messages %}
{% for message in messages %}
{{ message }}
{% endfor %}
{% endif %}

Add Friend

Send Friend Request

{% csrf_token %}
{{ friend_request_form.username }}

Create Invitation Link

{% csrf_token %}
{{ invitation_form.max_uses }}
{{ invitation_form.expires_in_days }}
{% if received_requests %}

Friend Requests {{ received_requests|length }}

{% for req in received_requests %}
{{ req.from_user.username|slice:":1"|upper }}
{{ req.from_user.username }}
{{ req.created_at|timesince }} ago
{% csrf_token %}
{% csrf_token %}
{% endfor %}
{% endif %} {% if sent_requests %}

Sent Requests

{% for req in sent_requests %}
{{ req.to_user.username|slice:":1"|upper }}
{{ req.to_user.username }}
Sent {{ req.created_at|timesince }} ago
{% csrf_token %}
{% endfor %}
{% endif %} {% if invitation_links %}

Your Invitation Links

{% for link in invitation_links %}
Created {{ link.created_at|timesince }} ago · Used {{ link.use_count }}/{{ link.max_uses }} times {% if link.expires_at %} · Expires {{ link.expires_at|timeuntil }}{% endif %}
{% csrf_token %}
{% endfor %}
{% endif %}

My Friends {{ friends|length }}

{% if friends %}
{% for friend_data in friends %}
{{ friend_data.user.username|slice:":1"|upper }}
{{ friend_data.user.username }}
Friends since {{ friend_data.friendship.created_at|date:"M d, Y" }}
{% if friend_data.room %} Chat {% endif %}
{% csrf_token %}
{% endfor %}
{% else %}

No friends yet

Start by sending a friend request or creating an invitation link above!

{% endif %}
{% endblock %}