register: Pass settings.WEB_PUBLIC_STREAMS_ENABLED to clients.

This commit adds 'server_web_public_streams_enabled' field to
the register response to pass settings.WEB_PUBLIC_STREAMS_ENABLED
to clients.
This commit is contained in:
Sahil Batra
2021-11-19 15:36:59 +05:30
committed by Tim Abbott
parent 828927b724
commit 2c1a87166c
4 changed files with 13 additions and 1 deletions

View File

@@ -33,7 +33,7 @@ DESKTOP_WARNING_VERSION = "5.4.3"
# Changes should be accompanied by documentation explaining what the
# new level means in templates/zerver/api/changelog.md, as well as
# "**Changes**" entries in the endpoint's documentation in `zulip.yaml`.
API_FEATURE_LEVEL = 109
API_FEATURE_LEVEL = 110
# Bump the minor PROVISION_VERSION to indicate that folks should provision
# only when going from an old version of the code to a newer version. Bump

View File

@@ -293,6 +293,7 @@ def fetch_initial_state_data(
state["server_inline_url_embed_preview"] = settings.INLINE_URL_EMBED_PREVIEW
state["server_avatar_changes_disabled"] = settings.AVATAR_CHANGES_DISABLED
state["server_name_changes_disabled"] = settings.NAME_CHANGES_DISABLED
state["server_web_public_streams_enabled"] = settings.WEB_PUBLIC_STREAMS_ENABLED
state["giphy_rating_options"] = realm.GIPHY_RATING_OPTIONS
state["server_needs_upgrade"] = is_outdated_server(user_profile)

View File

@@ -11100,6 +11100,16 @@ paths:
such that the web app will display to the current user a prominent warning.
**Changes**: New in Zulip 5.0 (feature level 74).
server_web_public_streams_enabled:
type: boolean
description: |
Present if `realm` is present in `fetch_event_types`.
Whether web public streams are enabled in the server. Similar topic_name
`realm_enable_spectator_access` but based on the `WEB_PUBLIC_STREAMS_ENABLED`
Zulip server level setting.
**Changes**: New in Zulip 5.0 (feature level 110).
event_queue_longpoll_timeout_seconds:
type: integer
description: |

View File

@@ -190,6 +190,7 @@ class HomeTest(ZulipTestCase):
"server_name_changes_disabled",
"server_needs_upgrade",
"server_timestamp",
"server_web_public_streams_enabled",
"settings_send_digest_emails",
"show_billing",
"show_plans",