Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

register: Include web-public streams in "streams" field of response.

Sahil Batrab92af1892856
diff --git a/api_docs/changelog.md b/api_docs/changelog.md
index 8976a953567..9bb6bfedb92 100644
--- a/api_docs/changelog.md
+++ b/api_docs/changelog.md
@@ -20,6 +20,11 @@ format used by the Zulip server that they are interacting with.
## Changes in Zulip 8.0
+**Feature level 205**
+
+* [`POST /register`](/api/register-queue): `streams` field in the response
+ now included web-public streams as well.
+
**Feature level 204**
* [`POST /register`](/api/register-queue): Added
diff --git a/zerver/lib/events.py b/zerver/lib/events.py
index 8912e60c175..ce585e109f7 100644
--- a/zerver/lib/events.py
+++ b/zerver/lib/events.py
@@ -572,7 +572,9 @@ def fetch_initial_state_data(
# places.
if user_profile is not None:
state["streams"] = do_get_streams(
- user_profile, include_all_active=user_profile.is_realm_admin
+ user_profile,
+ include_web_public=True,
+ include_all_active=user_profile.is_realm_admin,
)
else:
# TODO: This line isn't used by the web app because it
@@ -895,7 +897,9 @@ def apply_event(
if "streams" in state:
state["streams"] = do_get_streams(
- user_profile, include_all_active=user_profile.is_realm_admin
+ user_profile,
+ include_web_public=True,
+ include_all_active=user_profile.is_realm_admin,
)
if state["is_guest"]:
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index 6a7aa3108be..d478218a791 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -11804,6 +11804,9 @@ paths:
For organization administrators, this will include all private streams
in the organization.
+
+ **Changes**: As of Zulip 8.0 (feature level 205), this will include all
+ web-public streams in the organization as well.
realm_default_streams:
type: array
items: