mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
mention: Replace 'wildcards' with 'stream_wildcards'.
This prep commit replaces the 'wildcard' keyword in the codebase with 'stream_wildcard' at some places for better readability, as we plan to introduce 'topic_wildcards' as a part of the '@topic mention' project. Currently, 'wildcards = ["all", "everyone", "stream"]' which is an alias to mention everyone in the stream, hence better renamed as 'stream_wildcards'. Eventually, we will have: 'stream_wildcard' as an alias to mention everyone in the stream. 'topic_wildcard' as an alias to mention everyone in the topic. 'wildcard' refers to 'stream_wildcard' and 'topic_wildcard' as a whole.
This commit is contained in:
committed by
Tim Abbott
parent
d80779435a
commit
179d5cb37d
@@ -674,10 +674,10 @@ def get_gcm_alert(
|
||||
return f"{sender_str} mentioned @{mentioned_user_group_name} in #{display_recipient}"
|
||||
elif (
|
||||
message.is_stream_message()
|
||||
and trigger == NotificationTriggers.FOLLOWED_TOPIC_WILDCARD_MENTION
|
||||
and trigger == NotificationTriggers.STREAM_WILDCARD_MENTION_IN_FOLLOWED_TOPIC
|
||||
):
|
||||
return "TODO"
|
||||
elif message.is_stream_message() and trigger == NotificationTriggers.WILDCARD_MENTION:
|
||||
elif message.is_stream_message() and trigger == NotificationTriggers.STREAM_WILDCARD_MENTION:
|
||||
return f"{sender_str} mentioned everyone in #{display_recipient}"
|
||||
else:
|
||||
assert message.is_stream_message() and trigger == NotificationTriggers.STREAM_PUSH
|
||||
@@ -842,9 +842,9 @@ def get_apns_alert_subtitle(
|
||||
)
|
||||
else:
|
||||
return _("{full_name} mentioned you:").format(full_name=message.sender.full_name)
|
||||
elif trigger == NotificationTriggers.FOLLOWED_TOPIC_WILDCARD_MENTION:
|
||||
elif trigger == NotificationTriggers.STREAM_WILDCARD_MENTION_IN_FOLLOWED_TOPIC:
|
||||
return _("TODO")
|
||||
elif trigger == NotificationTriggers.WILDCARD_MENTION:
|
||||
elif trigger == NotificationTriggers.STREAM_WILDCARD_MENTION:
|
||||
return _("{full_name} mentioned everyone:").format(full_name=message.sender.full_name)
|
||||
elif message.recipient.type == Recipient.PERSONAL:
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user