diff --git a/fedireads/incoming.py b/fedireads/incoming.py index 6adde34a..544b40ed 100644 --- a/fedireads/incoming.py +++ b/fedireads/incoming.py @@ -48,7 +48,6 @@ def shared_inbox(request): return response - def verify_signature(request): ''' verify rsa signature ''' signature_dict = {} @@ -156,8 +155,6 @@ def get_status(request, username, status_id): return JsonResponse(status.activity) - - @csrf_exempt def get_followers(request, username): ''' return a list of followers for an actor ''' @@ -194,6 +191,7 @@ def format_follow_info(user, page, follow_queryset): 'first': '%s?page=1' % id_slug, }) + def get_follow_page(user_list, id_slug, page): ''' format a list of followers/following ''' page = int(page) @@ -243,15 +241,7 @@ def handle_incoming_shelve(activity): def handle_incoming_follow(activity): - ''' - { - "@context": "https://www.w3.org/ns/activitystreams", - "id": "https://friend.camp/768222ce-a1c7-479c-a544-c93b8b67fb54", - "type": "Follow", - "actor": "https://friend.camp/users/tripofmice", - "object": "https://ff2cb3e9.ngrok.io/api/u/mouse" - } - ''' + ''' someone wants to follow a local user ''' # figure out who they want to follow to_follow = models.User.objects.get(actor=activity['object']) # figure out who they are @@ -267,7 +257,6 @@ def handle_incoming_follow(activity): return HttpResponse() - def handle_incoming_follow_accept(activity): ''' hurray, someone remote accepted a follow request ''' # figure out who they want to follow @@ -320,7 +309,6 @@ def handle_incoming_create(activity): return response - def handle_incoming_accept(activity): ''' someone is accepting a follow request ''' # our local user diff --git a/fedireads/templates/feed.html b/fedireads/templates/feed.html index dd2fb873..6b8f2689 100644 --- a/fedireads/templates/feed.html +++ b/fedireads/templates/feed.html @@ -86,6 +86,9 @@ {% elif activity.activity_type == 'Follow' %} started following someone + {% elif activity.activity_type == 'Note' %} + posted + {{ activity.content.object.content | safe }} {% else %} {# generic handling for a misc activity, which perhaps should not be displayed at all #} did {{ activity.activity_type }}