From c3a750f5daccb6d924502b1a37058f016b01135f 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 d684171e9..900c9a219 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 dfd36da53..053999e84 100644 --- a/bookwyrm/models/status.py +++ b/bookwyrm/models/status.py @@ -370,7 +370,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 = []