Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
streams: Pass only stream IDs for default stream groups data.
Sahil Batra1182e7e350ce
diff --git a/api_docs/changelog.md b/api_docs/changelog.mdindex 582d8b68921..f5b6ef494f7 100644--- a/api_docs/changelog.md+++ b/api_docs/changelog.md@@ -25,6 +25,9 @@ format used by the Zulip server that they are interacting with.* [`POST /register`](/api/register-queue), [`GET /events`](/api/get-events):Default channels data only includes channel IDs now instead of fullchannel data.+* [`POST /register`](/api/register-queue), [`GET /events`](/api/get-events):+ Default channel groups data only includes channel IDs now instead of+ full channel data.**Feature level 329**diff --git a/version.py b/version.pyindex ce03df69b3d..c9cb0f06de6 100644--- a/version.py+++ b/version.py@@ -34,7 +34,7 @@ DESKTOP_WARNING_VERSION = "5.9.3"# new level means in api_docs/changelog.md, as well as "**Changes**"# entries in the endpoint's documentation in `zulip.yaml`.-API_FEATURE_LEVEL = 329 # Last bumped for adding field web_suggest_update_timezone+API_FEATURE_LEVEL = 330 # Last bumped for updating default streams data.# 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. Bumpdiff --git a/zerver/lib/event_schema.py b/zerver/lib/event_schema.pyindex b6a8ed31aa4..478c3ca70f1 100644--- a/zerver/lib/event_schema.py+++ b/zerver/lib/event_schema.py@@ -213,7 +213,7 @@ _check_stream_group = DictType(("name", str),("id", int),("description", str),- ("streams", ListType(DictType(default_stream_fields))),+ ("streams", ListType(int)),])diff --git a/zerver/models/streams.py b/zerver/models/streams.pyindex 63d0a3f6f44..b74471f0ec0 100644--- a/zerver/models/streams.py+++ b/zerver/models/streams.py@@ -402,7 +402,7 @@ class DefaultStreamGroup(models.Model):name=self.name,id=self.id,description=self.description,- streams=[stream.to_dict() for stream in self.streams.all().order_by("name")],+ streams=[stream.id for stream in self.streams.all().order_by("name")],)diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yamlindex 4b72c0d0c11..a987102222e 100644--- a/zerver/openapi/zulip.yaml+++ b/zerver/openapi/zulip.yaml@@ -2007,63 +2007,7 @@ paths:"name": "group1","id": 2,"description": "New description",- "streams":- [- {- "name": "Scotland",- "stream_id": 3,- "is_archived": false,- "description": "Located in the United Kingdom",- "rendered_description": "<p>Located in the United Kingdom</p>",- "date_created": 1691057093,- "creator_id": 8,- "invite_only": false,- "is_web_public": false,- "stream_post_policy": 1,- "history_public_to_subscribers": true,- "first_message_id": 1,- "is_recently_active": true,- "message_retention_days": null,- "is_announcement_only": false,- "can_remove_subscribers_group": 2,- },- {- "name": "Denmark",- "stream_id": 1,- "is_archived": false,- "description": "A Scandinavian country",- "rendered_description": "<p>A Scandinavian country</p>",- "date_created": 1691057093,- "creator_id": null,- "invite_only": false,- "is_web_public": false,- "stream_post_policy": 1,- "is_recently_active": true,- "history_public_to_subscribers": true,- "first_message_id": 4,- "message_retention_days": null,- "is_announcement_only": false,- "can_remove_subscribers_group": 2,- },- {- "name": "Verona",- "stream_id": 5,- "is_archived": false,- "description": "A city in Italy",- "rendered_description": "<p>A city in Italy</p>",- "date_created": 1691057093,- "creator_id": 9,- "invite_only": false,- "is_web_public": false,- "stream_post_policy": 1,- "history_public_to_subscribers": true,- "first_message_id": 6,- "is_recently_active": true,- "message_retention_days": null,- "is_announcement_only": false,- "can_remove_subscribers_group": 2,- },- ],+ "streams": [3, 1, 5],},],"id": 0,@@ -21916,48 +21860,6 @@ components:- is_announcement_only- can_remove_subscribers_group- stream_weekly_traffic- DefaultChannel:- allOf:- - $ref: "#/components/schemas/BasicChannelBase"- - additionalProperties: false- properties:- stream_id: {}- name: {}- is_archived: {}- description: {}- date_created: {}- creator_id:- nullable: true- invite_only: {}- rendered_description: {}- is_web_public: {}- stream_post_policy: {}- message_retention_days:- nullable: true- history_public_to_subscribers: {}- first_message_id:- nullable: true- is_recently_active: {}- is_announcement_only: {}- can_remove_subscribers_group: {}- can_administer_channel_group: {}- required:- - stream_id- - name- - is_archived- - description- - date_created- - creator_id- - invite_only- - rendered_description- - is_web_public- - stream_post_policy- - message_retention_days- - history_public_to_subscribers- - first_message_id- - is_recently_active- - is_announcement_only- - can_remove_subscribers_groupBasicChannelBase:type: objectdescription: |@@ -23160,10 +23062,13 @@ components:streams:type: arraydescription: |- Array containing details about the channels- in the default channel group.+ An array of IDs of all the channels in the default stream group.++ **Changes**: Before Zulip 10.0 (feature level 330), we sent array+ of dictionaries where each dictionary contained details about a+ single stream in the default stream group.items:- $ref: "#/components/schemas/DefaultChannel"+ type: integerEmailAddressVisibility:type: integerdescription: |