register: Handle "Pronouns" type fields for older mobile clients.

Mobile clients older than v27.192 do not support PRONOUNS type
custom profile fields, so we instead change the type of it to
SHORT_TEXT in the data sent with register response and also in
the events sent to those clients.
This commit is contained in:
Sahil Batra
2022-10-27 22:35:10 +05:30
committed by Tim Abbott
parent b2737b0878
commit 1fce1c3c73
9 changed files with 217 additions and 2 deletions

View File

@@ -75,6 +75,7 @@ def request_event_queue(
bulk_message_deletion: bool = False,
stream_typing_notifications: bool = False,
user_settings_object: bool = False,
pronouns_field_type_supported: bool = True,
) -> Optional[str]:
if not settings.USING_TORNADO:
@@ -96,6 +97,7 @@ def request_event_queue(
"bulk_message_deletion": orjson.dumps(bulk_message_deletion),
"stream_typing_notifications": orjson.dumps(stream_typing_notifications),
"user_settings_object": orjson.dumps(user_settings_object),
"pronouns_field_type_supported": orjson.dumps(pronouns_field_type_supported),
}
if event_types is not None: