Don't notify if we mention ourselves

Fixes #191
This commit is contained in:
Andrew Godwin 2022-12-18 09:48:18 -07:00
parent 90c7b615fd
commit bcd48368b5

View file

@ -43,7 +43,10 @@ class FanOutStates(StateGraph):
post=post, post=post,
) )
# We might have been mentioned # 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)( await sync_to_async(TimelineEvent.add_mentioned)(
identity=fan_out.identity, identity=fan_out.identity,
post=post, post=post,