mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-29 04:51:11 +00:00
Formatting and display fixes
This commit is contained in:
parent
b2e6b5c571
commit
f39cc6530b
2 changed files with 5 additions and 14 deletions
|
@ -48,7 +48,6 @@ def shared_inbox(request):
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def verify_signature(request):
|
def verify_signature(request):
|
||||||
''' verify rsa signature '''
|
''' verify rsa signature '''
|
||||||
signature_dict = {}
|
signature_dict = {}
|
||||||
|
@ -156,8 +155,6 @@ def get_status(request, username, status_id):
|
||||||
return JsonResponse(status.activity)
|
return JsonResponse(status.activity)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@csrf_exempt
|
@csrf_exempt
|
||||||
def get_followers(request, username):
|
def get_followers(request, username):
|
||||||
''' return a list of followers for an actor '''
|
''' 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,
|
'first': '%s?page=1' % id_slug,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
def get_follow_page(user_list, id_slug, page):
|
def get_follow_page(user_list, id_slug, page):
|
||||||
''' format a list of followers/following '''
|
''' format a list of followers/following '''
|
||||||
page = int(page)
|
page = int(page)
|
||||||
|
@ -243,15 +241,7 @@ def handle_incoming_shelve(activity):
|
||||||
|
|
||||||
|
|
||||||
def handle_incoming_follow(activity):
|
def handle_incoming_follow(activity):
|
||||||
'''
|
''' someone wants to follow a local user '''
|
||||||
{
|
|
||||||
"@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"
|
|
||||||
}
|
|
||||||
'''
|
|
||||||
# figure out who they want to follow
|
# figure out who they want to follow
|
||||||
to_follow = models.User.objects.get(actor=activity['object'])
|
to_follow = models.User.objects.get(actor=activity['object'])
|
||||||
# figure out who they are
|
# figure out who they are
|
||||||
|
@ -267,7 +257,6 @@ def handle_incoming_follow(activity):
|
||||||
return HttpResponse()
|
return HttpResponse()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def handle_incoming_follow_accept(activity):
|
def handle_incoming_follow_accept(activity):
|
||||||
''' hurray, someone remote accepted a follow request '''
|
''' hurray, someone remote accepted a follow request '''
|
||||||
# figure out who they want to follow
|
# figure out who they want to follow
|
||||||
|
@ -320,7 +309,6 @@ def handle_incoming_create(activity):
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def handle_incoming_accept(activity):
|
def handle_incoming_accept(activity):
|
||||||
''' someone is accepting a follow request '''
|
''' someone is accepting a follow request '''
|
||||||
# our local user
|
# our local user
|
||||||
|
|
|
@ -86,6 +86,9 @@
|
||||||
{% elif activity.activity_type == 'Follow' %}
|
{% elif activity.activity_type == 'Follow' %}
|
||||||
started following someone
|
started following someone
|
||||||
</h2>
|
</h2>
|
||||||
|
{% elif activity.activity_type == 'Note' %}
|
||||||
|
posted</h2>
|
||||||
|
{{ activity.content.object.content | safe }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{# generic handling for a misc activity, which perhaps should not be displayed at all #}
|
{# generic handling for a misc activity, which perhaps should not be displayed at all #}
|
||||||
did {{ activity.activity_type }}
|
did {{ activity.activity_type }}
|
||||||
|
|
Loading…
Reference in a new issue