From 6fa78d7733e6ee28be519b9358e0bc3c4193aa40 Mon Sep 17 00:00:00 2001 From: Chris Bobbe Date: Mon, 1 Nov 2021 17:39:33 -0700 Subject: [PATCH] RealmState type [nfc]: Use server API documentation more in comments As Greg suggests at https://github.com/zulip/zulip-mobile/pull/5084#discussion_r740557965. --- src/reduxTypes.js | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/reduxTypes.js b/src/reduxTypes.js index e3408e52122..932fcc26add 100644 --- a/src/reduxTypes.js +++ b/src/reduxTypes.js @@ -232,25 +232,28 @@ export type VideoChatProvider = $ReadOnly<{| name: 'jitsi_meet', jitsiServerUrl: /** * State with miscellaneous data from the server; our state subtree `realm`. * + * "Initial data", below, refers to data in the register-queue response: + * https://zulip.com/api/register-queue#response + * * Despite the name, this info doesn't necessarily have much to do with the * Zulip organization/realm; some properties do, but others are per-user, * and others are per-server. * * About the server: - * @prop crossRealmBots - The server's cross-realm bots; e.g., Welcome Bot. - * Cross-realm bots should be treated like normal bots. + * @prop crossRealmBots - Corresponds to cross_realm_bots in initial data. + * We use our `AvatarURL` class at `.avatar_url`. * * About the org/realm: - * @prop nonActiveUsers - All users in the organization with `is_active` - * false; for normal users, this means they or an admin deactivated their - * account. See `User` and the linked documentation. - * @prop filters - * @prop emoji + * @prop nonActiveUsers - Corresponds to realm_non_active_users in initial + * data. We use our `AvatarURL` class at `.avatar_url`. + * @prop filters - Corresponds to realm_linkifiers/realm_filters in initial + * data. For now, we use the legacy realm_filters form internally. + * @prop emoji - Corresponds to realm_emoji in initial data. * @prop videoChatProvider - The video chat provider configured by the * server; null if none, or if the configured provider is one we don't * support. - * @prop mandatoryTopics - Whether topics are required in stream messages - * (see https://zulip.com/help/require-topics) + * @prop mandatoryTopics - Corresponds to realm_mandatory_topics in initial + * data. * @prop messageContentDeleteLimitSeconds - Corresponds to * realm_message_content_delete_limit_seconds in initial data. We use the * Zulip Server 5.0+ convention that `null` means no limit, and 0 is