From 5f9dcdd98bb73db65c69888730a9641618a90846 Mon Sep 17 00:00:00 2001 From: Marnanel Thurman Date: Sat, 5 Oct 2019 16:00:25 +0100 Subject: [PATCH] Include Atom URL in the Actor view. --- django_kepi/views/activitypub.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/django_kepi/views/activitypub.py b/django_kepi/views/activitypub.py index 33ef538..bb42b7d 100644 --- a/django_kepi/views/activitypub.py +++ b/django_kepi/views/activitypub.py @@ -378,6 +378,12 @@ class ActorView(ThingView): 'name': self._username, 'host': settings.KEPI['LOCAL_OBJECT_HOSTNAME'], })) + + atom_url = settings.KEPI['USER_FEED_URLS'].format( + username = self._username, + hostname = settings.KEPI['LOCAL_OBJECT_HOSTNAME'], + ) + links = [ { 'url': webfinger_url, @@ -385,8 +391,11 @@ class ActorView(ThingView): 'type': 'application/xrd+xml', }, - # TODO: rel: alternate, type: application/atom+xml, - # but that will be set by tophat and not kepi + { + 'url': atom_url, + 'rel': 'alternate', + 'type': 'application/atom+xml', + }, { 'url': user_url,