mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
notification_triggers: Reduce loose string usage.
This commit uses 'NotificationTriggers' class attributes
instead of directly using loose strings.
This should have been ideally included in the commit
c3319a5231.
This commit is contained in:
committed by
Tim Abbott
parent
e2847790b6
commit
e12cd9862a
@@ -36,6 +36,7 @@ from zerver.lib.url_encoding import (
|
|||||||
)
|
)
|
||||||
from zerver.models import (
|
from zerver.models import (
|
||||||
Message,
|
Message,
|
||||||
|
NotificationTriggers,
|
||||||
Realm,
|
Realm,
|
||||||
Recipient,
|
Recipient,
|
||||||
Stream,
|
Stream,
|
||||||
@@ -524,7 +525,8 @@ def do_send_missedmessage_events_reply_in_zulip(
|
|||||||
{
|
{
|
||||||
m["message"].sender
|
m["message"].sender
|
||||||
for m in missed_messages
|
for m in missed_messages
|
||||||
if m["trigger"] == "mentioned" or m["trigger"] == "wildcard_mentioned"
|
if m["trigger"] == NotificationTriggers.MENTION
|
||||||
|
or m["trigger"] == NotificationTriggers.WILDCARD_MENTION
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
message = missed_messages[0]["message"]
|
message = missed_messages[0]["message"]
|
||||||
|
|||||||
Reference in New Issue
Block a user