Safer serialization of shelve and unshelve activities

This commit is contained in:
Mouse Reeve 2021-04-07 11:02:56 -07:00
parent e61a104bcf
commit 5427790c4e

View file

@ -370,7 +370,7 @@ class CollectionItemMixin(ActivitypubMixin):
object_field = getattr(self, self.object_field)
collection_field = getattr(self, self.collection_field)
return activitypub.Add(
id=self.remote_id,
id=self.get_remote_id(),
actor=self.user.remote_id,
object=object_field,
target=collection_field.remote_id,
@ -381,7 +381,7 @@ class CollectionItemMixin(ActivitypubMixin):
object_field = getattr(self, self.object_field)
collection_field = getattr(self, self.collection_field)
return activitypub.Remove(
id=self.remote_id,
id=self.get_remote_id(),
actor=self.user.remote_id,
object=object_field,
target=collection_field.remote_id,