Merge pull request #905 from mouse-reeve/shelve-action-serialization

Safer serialization of shelve and un-shelve activities
This commit is contained in:
Mouse Reeve 2021-04-07 11:18:39 -07:00 committed by GitHub
commit 2c5f62e6cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -385,7 +385,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,
@ -396,7 +396,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,