notifications: Remove the stray notification trigger strings.

This commit removes the stray strings used to refer to
various types of notification triggers.

We use the attributes of the 'NotificationTriggers' class instead.
This commit is contained in:
Prakhar Pratyush
2023-07-24 17:56:43 +05:30
committed by Tim Abbott
parent e760e57bce
commit af648833f2
10 changed files with 189 additions and 121 deletions

View File

@@ -323,7 +323,10 @@ def get_mentioned_user_group_name(
messages instead.
"""
for message in messages:
if message["mentioned_user_group_id"] is None and message["trigger"] == "mentioned":
if (
message["mentioned_user_group_id"] is None
and message["trigger"] == NotificationTriggers.MENTION
):
# The user has also been personally mentioned, so that gets prioritized.
return None