Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
events: Add display name and event types to realm_incoming_webhook_bots.
Satyam Bansald8998ab040f4
diff --git a/api_docs/changelog.md b/api_docs/changelog.mdindex 77847eb6909..fadc36a1144 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 207**++* [`POST /register`](/api/register-queue): Added `display_name` and+ `all_event_types` fields to the `realm_incoming_webhook_bots` object.+**Feature level 206*** `POST /calls/zoom/create`: Added `is_video_call` parameterdiff --git a/version.py b/version.pyindex 354bd40cdae..1cf50ab1a90 100644--- a/version.py+++ b/version.py@@ -33,7 +33,7 @@ DESKTOP_WARNING_VERSION = "5.9.3"# Changes should be accompanied by documentation explaining what the# new level means in api_docs/changelog.md, as well as "**Changes**"# entries in the endpoint's documentation in `zulip.yaml`.-API_FEATURE_LEVEL = 206+API_FEATURE_LEVEL = 207# 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/events.py b/zerver/lib/events.pyindex 139ef7376f6..b8f34834100 100644--- a/zerver/lib/events.py+++ b/zerver/lib/events.py@@ -19,7 +19,11 @@ from zerver.lib.default_streams import get_default_streams_for_realm_as_dictsfrom zerver.lib.exceptions import JsonableErrorfrom zerver.lib.external_accounts import get_default_external_accountsfrom zerver.lib.hotspots import get_next_hotspots-from zerver.lib.integrations import EMBEDDED_BOTS, WEBHOOK_INTEGRATIONS+from zerver.lib.integrations import (+ EMBEDDED_BOTS,+ WEBHOOK_INTEGRATIONS,+ get_all_event_types_for_integration,+)from zerver.lib.message import (add_message_to_unread_msgs,aggregate_unread_data,@@ -510,6 +514,8 @@ def fetch_initial_state_data(state["realm_incoming_webhook_bots"] = [{"name": integration.name,+ "display_name": integration.display_name,+ "all_event_types": get_all_event_types_for_integration(integration),"config": {c[1]: c[0] for c in integration.config_options},}for integration in WEBHOOK_INTEGRATIONSdiff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yamlindex 26c0326ec49..96a89d6f02e 100644--- a/zerver/openapi/zulip.yaml+++ b/zerver/openapi/zulip.yaml@@ -11547,6 +11547,26 @@ paths:type: stringdescription: |The name of the bot.+ display_name:+ type: string+ description: |+ A human-readable display name identifying the integration that this bot implements,+ intended to be used in menus for selecting which integration to create.++ **Changes**: New in Zulip 8.0 (feature level 207).+ all_event_types:+ type: array+ items:+ type: string+ nullable: true+ description: |+ For incoming webhook integrations that support the Zulip server filtering incoming+ events, the list of event types supported by it.++ A null value will be present if this incoming webhook integration doesn't support+ such filtering.++ **Changes**: New in Zulip 8.0 (feature level 207).config:$ref: "#/components/schemas/Config"recent_private_conversations: