fixes avoiding mention and reply notification

This commit is contained in:
Mouse Reeve 2021-02-10 16:28:50 -08:00
parent e6b9985f95
commit b774e946f3

View file

@ -73,9 +73,9 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel):
) )
for mention_user in self.mention_users.all(): for mention_user in self.mention_users.all():
# avoid double-notifying about this status # avoid double-notifying about this status
if not mention_user.local or notification_model.objects.filter( if not mention_user.local or \
user=mention_user, related_status=self, (self.reply_parent and \
related_user=self.user).exists(): mention_user == self.reply_parent.user):
continue continue
notification_model.objects.create( notification_model.objects.create(
user=mention_user, user=mention_user,