mirror of https://github.com/zulip/zulip.git
1a400b21e7
A missed message email notification, where the message is the welcome message sent by the welcome bot on account creation, get sent when the user somehow not focuses the browser tab during account creation. No missed message email or push notifications should be sent for the messages generated by the welcome bot. 'internal_send_private_message' accepts a parameter 'disable_external_notifications' and is set to 'True' when the sender is 'welcome bot'. A check is introduced in `trivially_should_not_notify`, not to notify if `disable_external_notifications` is true. TestCases are updated to include the `disable_external_notifications` check in the early (False) return patterns of `is_push_notifiable` and `is_email_notifiable`. One query reduced for both `test_create_user_with_multiple_streams` and `test_register`. Reason: When welcome bot sends message after user creation `do_send_messages` calls `get_active_presence_idle_user_ids`, `user_ids` in `get_active_presence_idle_user_ids` remains empty if `disable_external_notifications` is true because `is_notifiable` returns false. `get_active_presence_idle_user_ids` calls `filter_presence_idle_user_ids` and since the `user_ids` is empty, the query inside the function doesn't get executed. MissedMessageHookTest updated. Fixes: #22884 |
||
---|---|---|
.. | ||
__init__.py | ||
application.py | ||
descriptors.py | ||
django_api.py | ||
event_queue.py | ||
exceptions.py | ||
handlers.py | ||
ioloop_logging.py | ||
sharding.py | ||
views.py |