Browse Source

Notify users about mention in PT if they are participant or moderator and thread has reported

Rafał Pitoń 11 years ago
parent
commit
c21ee224f9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      misago/apps/privatethreads/mixins.py

+ 2 - 1
misago/apps/privatethreads/mixins.py

@@ -41,7 +41,8 @@ class TypeMixin(object):
             if self.md.mentions:
                 participants = self.thread.participants.all()
                 for slug, user in self.md.mentions.items():
-                    if user not in participants:
+                    user_acl = user.acl(self.request)
+                    if not (user in participants or (user_acl.private_threads.can_participate() and user_acl.private_threads.is_mod() and self.thread.replies_reported > 0)):
                         del self.md.mentions[slug]
         except AttributeError:
             pass