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: