From 495e955378d62dc439c4c210785e5d401bc77f64 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Wed, 16 Nov 2022 06:53:39 -0700 Subject: Tag and visibility handling --- activities/models/timeline_event.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'activities/models/timeline_event.py') diff --git a/activities/models/timeline_event.py b/activities/models/timeline_event.py index 29dec19..368fdad 100644 --- a/activities/models/timeline_event.py +++ b/activities/models/timeline_event.py @@ -81,6 +81,17 @@ class TimelineEvent(models.Model): subject_post=post, )[0] + @classmethod + def add_mentioned(cls, identity, post): + """ + Adds a mention of identity by post + """ + return cls.objects.get_or_create( + identity=identity, + type=cls.Types.mentioned, + subject_post=post, + )[0] + @classmethod def add_post_interaction(cls, identity, interaction): """ -- cgit v1.2.3