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:
Prakhar Pratyush
2023-06-03 20:21:38 +05:30
committed by Tim Abbott
parent d80779435a
commit 179d5cb37d
28 changed files with 444 additions and 320 deletions

View File

@@ -306,7 +306,7 @@ def get_subscriptions_for_send_message(
realm_id: int,
stream_id: int,
topic_name: str,
possible_wildcard_mention: bool,
possible_stream_wildcard_mention: bool,
possibly_mentioned_user_ids: AbstractSet[int],
) -> QuerySet[Subscription]:
"""This function optimizes an important use case for large
@@ -342,7 +342,7 @@ def get_subscriptions_for_send_message(
include_deactivated_users=False,
)
if possible_wildcard_mention:
if possible_stream_wildcard_mention:
return query
query = query.filter(