From bcd48368b5cc90a46162b1aaad8c6a1671a23448 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 18 Dec 2022 09:48:18 -0700 Subject: [PATCH] Don't notify if we mention ourselves Fixes #191 --- activities/models/fan_out.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/activities/models/fan_out.py b/activities/models/fan_out.py index c522938..2f73ba4 100644 --- a/activities/models/fan_out.py +++ b/activities/models/fan_out.py @@ -43,7 +43,10 @@ class FanOutStates(StateGraph): post=post, ) # We might have been mentioned - if fan_out.identity.id in mentioned: + if ( + fan_out.identity.id in mentioned + and fan_out.identity_id != post.author_id + ): await sync_to_async(TimelineEvent.add_mentioned)( identity=fan_out.identity, post=post,