From bb42539b3f5010bd806365c299333c1121f77cd8 Mon Sep 17 00:00:00 2001 From: Rohitt Vashishtha Date: Fri, 22 Nov 2019 15:20:33 +0530 Subject: [PATCH] do_send_messages: Populate possible_wildcard_mentions from MentionData. Fixes #13430. --- zerver/lib/actions.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index 72687ab88d..3110b49067 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -1338,13 +1338,7 @@ def do_send_messages(messages_maybe_none: Sequence[Optional[MutableMapping[str, sender_id=message['message'].sender_id, stream_topic=stream_topic, possibly_mentioned_user_ids=mention_data.get_user_ids(), - # TODO: We should improve the `mention_data` logic to - # populate the possible_wildcard_mention field based on - # whether wildcard mention syntax actually appears in the - # message, to avoid wasting resources computing - # wildcard_mention_user_ids for messages that could - # not possibly contain a wildcard mention. - possible_wildcard_mention=True, + possible_wildcard_mention=mention_data.message_has_wildcards(), ) message['active_user_ids'] = info['active_user_ids']