mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-02-02 12:22:22 +00:00
Merge pull request #905 from mouse-reeve/shelve-action-serialization
Safer serialization of shelve and un-shelve activities
This commit is contained in:
commit
2c5f62e6cd
1 changed files with 2 additions and 2 deletions
|
@ -385,7 +385,7 @@ class CollectionItemMixin(ActivitypubMixin):
|
||||||
object_field = getattr(self, self.object_field)
|
object_field = getattr(self, self.object_field)
|
||||||
collection_field = getattr(self, self.collection_field)
|
collection_field = getattr(self, self.collection_field)
|
||||||
return activitypub.Add(
|
return activitypub.Add(
|
||||||
id=self.remote_id,
|
id=self.get_remote_id(),
|
||||||
actor=self.user.remote_id,
|
actor=self.user.remote_id,
|
||||||
object=object_field,
|
object=object_field,
|
||||||
target=collection_field.remote_id,
|
target=collection_field.remote_id,
|
||||||
|
@ -396,7 +396,7 @@ class CollectionItemMixin(ActivitypubMixin):
|
||||||
object_field = getattr(self, self.object_field)
|
object_field = getattr(self, self.object_field)
|
||||||
collection_field = getattr(self, self.collection_field)
|
collection_field = getattr(self, self.collection_field)
|
||||||
return activitypub.Remove(
|
return activitypub.Remove(
|
||||||
id=self.remote_id,
|
id=self.get_remote_id(),
|
||||||
actor=self.user.remote_id,
|
actor=self.user.remote_id,
|
||||||
object=object_field,
|
object=object_field,
|
||||||
target=collection_field.remote_id,
|
target=collection_field.remote_id,
|
||||||
|
|
Loading…
Reference in a new issue