Adds avatars to activitypub actor

Fixes #45
This commit is contained in:
Mouse Reeve
2020-03-27 09:58:25 -07:00
parent 5ebe1aa7c7
commit eaa0227c1a
2 changed files with 18 additions and 1 deletions

View File

@ -6,7 +6,7 @@ from django.urls import path, re_path
from fedireads import incoming, outgoing, views, settings, wellknown
from fedireads import view_actions as actions
username_regex = r'(?P<username>[\w@\-_\.]+)'
username_regex = r'(?P<username>[\w\-_]+@[\w\-\_\.]+)'
localname_regex = r'(?P<username>[\w\-_]+)'
user_path = r'^user/%s' % username_regex
local_user_path = r'^user/%s' % localname_regex
@ -39,6 +39,7 @@ urlpatterns = [
# should return a ui view or activitypub json blob as requested
# users
re_path(r'%s/?$' % user_path, views.user_page),
re_path(r'%s/?$' % local_user_path, views.user_page),
re_path(r'%s\.json$' % local_user_path, views.user_page),
re_path(r'user-edit/?$', views.edit_profile_page),
re_path(r'%s/shelves/?$' % local_user_path, views.user_shelves_page),
@ -60,6 +61,7 @@ urlpatterns = [
re_path(r'^author/(?P<author_identifier>\w+)/?$', views.author_page),
re_path(r'^tag/(?P<tag_id>.+)/?$', views.tag_page),
re_path(r'^shelf/%s/(?P<shelf_identifier>[\w-]+)/?$' % username_regex, views.shelf_page),
re_path(r'^shelf/%s/(?P<shelf_identifier>[\w-]+)/?$' % localname_regex, views.shelf_page),
# internal action endpoints
re_path(r'^logout/?$', actions.user_logout),