From acdce4df4797171fbcd807e0d39fc94d48e475dd Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Bodas Date: Sat, 18 Dec 2021 14:55:15 +0530 Subject: [PATCH] actions: Fix misleading comment about wildcard mentions. Having the `wildcard_mentions_notify` setting turned on does not necessarily mean that the user will receive notification for that message. There is more nuance to this, as explained in the updated comment. --- zerver/lib/actions.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index 125d9f6b11..05cd05cbfd 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -1620,15 +1620,11 @@ def get_recipient_info( if possible_wildcard_mention: # If there's a possible wildcard mention, we need to - # determine which users would receive a wildcard mention - # notification for this message should the message indeed - # contain a wildcard mention. - # - # We don't have separate values for push/email - # notifications here; at this stage, we're just - # determining whether this wildcard mention should be - # treated as a mention (and follow the user's mention - # notification preferences) or a normal message. + # determine the set of users who have enabled the + # "wildcard_mentions_notify" setting (that is, the set of + # users for whom wildcard mentions should be treated like + # personal mentions for notifications). This setting + # applies to both email and push notifications. wildcard_mention_user_ids = { row["user_profile_id"] for row in subscription_rows