Only make notification count red for mentions
This commit is contained in:
parent
b4c155f134
commit
454dd25681
4 changed files with 22 additions and 3 deletions
|
@ -150,6 +150,19 @@ class User(OrderedCollectionPageMixin, AbstractUser):
|
|||
"""for consistent naming"""
|
||||
return not self.is_active
|
||||
|
||||
@property
|
||||
def unread_notification_count(self):
|
||||
""" count of notifications, for the templates """
|
||||
return self.notification_set.filter(read=False).count()
|
||||
|
||||
@property
|
||||
def has_unread_mentions(self):
|
||||
""" whether any of the unread notifications are conversations """
|
||||
return self.notification_set.filter(
|
||||
read=False,
|
||||
notification_type__in=["REPLY", "MENTION", "TAG"],
|
||||
).exists()
|
||||
|
||||
activity_serializer = activitypub.Person
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue