From 3fe3b0b2d590d809db16ceeea4c8a7bb75ac38e4 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 24 Mar 2021 13:25:00 -0700 Subject: [PATCH] Adds published date field to boost activity --- bookwyrm/activitypub/verbs.py | 1 + bookwyrm/models/status.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bookwyrm/activitypub/verbs.py b/bookwyrm/activitypub/verbs.py index d684171e..900c9a21 100644 --- a/bookwyrm/activitypub/verbs.py +++ b/bookwyrm/activitypub/verbs.py @@ -191,6 +191,7 @@ class Like(Verb): class Announce(Verb): """ boosting a status """ + published: str object: str type: str = "Announce" diff --git a/bookwyrm/models/status.py b/bookwyrm/models/status.py index c471a4d9..aa330d61 100644 --- a/bookwyrm/models/status.py +++ b/bookwyrm/models/status.py @@ -377,7 +377,7 @@ class Boost(ActivityMixin, Status): """ the user field is "actor" here instead of "attributedTo" """ super().__init__(*args, **kwargs) - reserve_fields = ["user", "boosted_status"] + reserve_fields = ["user", "boosted_status", "published_date"] self.simple_fields = [f for f in self.simple_fields if f.name in reserve_fields] self.activity_fields = self.simple_fields self.many_to_many_fields = []