events: Add "user_settings_object" to client_capabilities.

This commit adds "user_settings_object" field to
client_capabilities which will be used to determine
if the client needs 'update_display_settings' and
'update_global_notifications' event.
This commit is contained in:
Sahil Batra
2021-07-24 23:21:25 +05:30
committed by Tim Abbott
parent 7959ae3fab
commit 0364d0c8ca
9 changed files with 70 additions and 2 deletions

View File

@@ -1217,6 +1217,7 @@ def do_events_register(
"user_avatar_url_field_optional", False
)
stream_typing_notifications = client_capabilities.get("stream_typing_notifications", False)
user_settings_object = client_capabilities.get("user_settings_object", False)
if user_profile.realm.email_address_visibility != Realm.EMAIL_ADDRESS_VISIBILITY_EVERYONE:
# If real email addresses are not available to the user, their
@@ -1248,6 +1249,7 @@ def do_events_register(
narrow=narrow,
bulk_message_deletion=bulk_message_deletion,
stream_typing_notifications=stream_typing_notifications,
user_settings_object=user_settings_object,
)
if queue_id is None: