Hacky fix for serializing boost

This commit is contained in:
Mouse Reeve
2020-12-18 11:34:21 -08:00
parent 80de6079fa
commit 606e93fb12
3 changed files with 73 additions and 2 deletions

View File

@ -71,6 +71,9 @@ class ActivitypubFieldMixin:
return
key = self.get_activitypub_field()
# TODO: surely there's a better way
if instance.__class__.__name__ == 'Boost' and key == 'attributedTo':
key = 'actor'
if isinstance(activity.get(key), list):
activity[key] += formatted
else:

View File

@ -189,8 +189,7 @@ class Review(Status):
@property
def pure_content(self):
''' indicate the book in question for mastodon (or w/e) users '''
return self.content + '<br><br>(<a href="%s">"%s"</a>)' % \
(self.book.remote_id, self.book.title)
return self.content
activity_serializer = activitypub.Review
pure_type = 'Article'