From 5427790c4e14a03bc8d57377560f17d0fd9c2f3b Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 7 Apr 2021 11:02:56 -0700 Subject: [PATCH] Safer serialization of shelve and unshelve activities --- bookwyrm/models/activitypub_mixin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bookwyrm/models/activitypub_mixin.py b/bookwyrm/models/activitypub_mixin.py index a253207ac..a4f4f353a 100644 --- a/bookwyrm/models/activitypub_mixin.py +++ b/bookwyrm/models/activitypub_mixin.py @@ -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,