Fixes weirdness in handling avatars

- urls weren't serialized correctly for activitypub
- the filename shouldn't have been preserved as-is
This commit is contained in:
Mouse Reeve
2020-11-01 12:36:56 -08:00
parent 4b7de93c90
commit 2b0b88802b
2 changed files with 8 additions and 2 deletions

View File

@ -84,7 +84,8 @@ class User(OrderedCollectionPageMixin, AbstractUser):
if self.avatar:
url = self.avatar.url
else:
url = 'https://%s/static/images/default_avi.jpg' % DOMAIN
url = '/static/images/default_avi.jpg'
url = 'https://%s%s' % (DOMAIN, url)
return activitypub.Image(url=url)
@property