zerver: API to create channel.

Fixes #16206.

Co-authored-by: Sahil Batra <sahil@zulip.com>
Co-authored-by: Steve Howell <showell@zulip.com>
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
This commit is contained in:
apoorvapendse
2025-07-02 11:26:37 +05:30
committed by Tim Abbott
parent 6ef2591b47
commit 6203861529
12 changed files with 750 additions and 22 deletions

View File

@@ -188,6 +188,7 @@ from zerver.views.storage import get_storage, remove_storage, update_storage
from zerver.views.streams import (
add_default_stream,
add_subscriptions_backend,
create_channel,
create_default_stream_group,
deactivate_stream_backend,
delete_in_topic,
@@ -531,6 +532,7 @@ v1_api_and_json_patterns = [
# streams -> zerver.views.streams
# (this API is only used externally)
rest_path("streams", GET=get_streams_backend),
rest_path("channels/create", POST=create_channel),
# GET returns `stream_id`, stream name should be encoded in the URL query (in `stream` param)
rest_path("get_stream_id", GET=json_get_stream_id),
# GET returns "stream info" (undefined currently?), HEAD returns whether stream exists (200 or 404)