summaryrefslogtreecommitdiffstats
path: root/activities/models/timeline_event.py
diff options
context:
space:
mode:
Diffstat (limited to 'activities/models/timeline_event.py')
-rw-r--r--activities/models/timeline_event.py11
1 files changed, 11 insertions, 0 deletions
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
@@ -82,6 +82,17 @@ class TimelineEvent(models.Model):
)[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):
"""
Adds a boost/like to the timeline if it's not there already.