diff options
author | Andrew Godwin | 2022-12-11 12:37:28 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-12-12 11:56:49 -0700 |
commit | 20239b5cb7455d593680b17d2d80d2a4850c524d (patch) | |
tree | 1c5705837e17bca50920848d00bfcf1f7c2313af /activities/models/timeline_event.py | |
parent | fc8a21fc5c6809ea115092eeec57e09e984cdd76 (diff) | |
download | takahe-20239b5cb7455d593680b17d2d80d2a4850c524d.tar.gz takahe-20239b5cb7455d593680b17d2d80d2a4850c524d.tar.bz2 takahe-20239b5cb7455d593680b17d2d80d2a4850c524d.zip |
Basic post mutation
Diffstat (limited to 'activities/models/timeline_event.py')
-rw-r--r-- | activities/models/timeline_event.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/activities/models/timeline_event.py b/activities/models/timeline_event.py index 30d473d..16f8632 100644 --- a/activities/models/timeline_event.py +++ b/activities/models/timeline_event.py @@ -148,7 +148,7 @@ class TimelineEvent(models.Model): ### Mastodon Client API ### - def to_mastodon_notification_json(self): + def to_mastodon_notification_json(self, interactions=None): result = { "id": self.pk, "created_at": format_ld_date(self.created), @@ -156,13 +156,19 @@ class TimelineEvent(models.Model): } if self.type == self.Types.liked: result["type"] = "favourite" - result["status"] = self.subject_post.to_mastodon_json() + result["status"] = self.subject_post.to_mastodon_json( + interactions=interactions + ) elif self.type == self.Types.boosted: result["type"] = "reblog" - result["status"] = self.subject_post.to_mastodon_json() + result["status"] = self.subject_post.to_mastodon_json( + interactions=interactions + ) elif self.type == self.Types.mentioned: result["type"] = "mention" - result["status"] = self.subject_post.to_mastodon_json() + result["status"] = self.subject_post.to_mastodon_json( + interactions=interactions + ) elif self.type == self.Types.followed: result["type"] = "follow" else: |