From b774e946f3c4a1f4720c642b87049dd0ccda95eb Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 10 Feb 2021 16:28:50 -0800 Subject: [PATCH] fixes avoiding mention and reply notification --- bookwyrm/models/status.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bookwyrm/models/status.py b/bookwyrm/models/status.py index bda4d3e8..62effeb8 100644 --- a/bookwyrm/models/status.py +++ b/bookwyrm/models/status.py @@ -73,9 +73,9 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel): ) for mention_user in self.mention_users.all(): # avoid double-notifying about this status - if not mention_user.local or notification_model.objects.filter( - user=mention_user, related_status=self, - related_user=self.user).exists(): + if not mention_user.local or \ + (self.reply_parent and \ + mention_user == self.reply_parent.user): continue notification_model.objects.create( user=mention_user,