Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
process_message_event: Always calculate `online_push_enabled`.
Abhijeet Prasad Bodas3ff3ded1ae29
diff --git a/zerver/tornado/event_queue.py b/zerver/tornado/event_queue.pyindex d5ac1f607f2..ac7fb573409 100644--- a/zerver/tornado/event_queue.py+++ b/zerver/tornado/event_queue.py@@ -952,6 +952,16 @@ def process_message_event(wildcard_mention_notify = user_data.get("wildcard_mention_notify", False)sender_is_muted = user_data.get("sender_is_muted", False)+ # TODO/compatibility: Translation code for the rename of+ # `always_push_notify` to `online_push_enabled`. Remove this+ # when one can no longer directly upgrade from 4.x to master.+ if "online_push_enabled" in user_data:+ online_push_enabled = user_data["online_push_enabled"]+ elif "always_push_notify" in user_data:+ online_push_enabled = user_data["always_push_notify"]+ else:+ online_push_enabled = False+extra_user_data[user_profile_id] = dict(internal_data=dict(mentioned=mentioned,@@ -979,16 +989,6 @@ def process_message_event(user_profile_id in presence_idle_user_ids)- # TODO/compatibility: Translation code for the rename of- # `always_push_notify` to `online_push_enabled`. Remove this- # when one can no longer directly upgrade from 4.x to master.- if "online_push_enabled" in user_data:- online_push_enabled = user_data["online_push_enabled"]- elif "always_push_notify" in user_data:- online_push_enabled = user_data["always_push_notify"]- else:- online_push_enabled = False-stream_name = event_template.get("stream_name")extra_user_data[user_profile_id]["internal_data"].update(