mirror of https://github.com/zulip/zulip.git
events: Add display name and event types to realm_incoming_webhook_bots.
This commit is contained in:
parent
2370372705
commit
d8998ab040
|
@ -20,6 +20,11 @@ format used by the Zulip server that they are interacting with.
|
||||||
|
|
||||||
## Changes in Zulip 8.0
|
## 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**
|
**Feature level 206**
|
||||||
|
|
||||||
* `POST /calls/zoom/create`: Added `is_video_call` parameter
|
* `POST /calls/zoom/create`: Added `is_video_call` parameter
|
||||||
|
|
|
@ -33,7 +33,7 @@ DESKTOP_WARNING_VERSION = "5.9.3"
|
||||||
# Changes should be accompanied by documentation explaining what the
|
# Changes should be accompanied by documentation explaining what the
|
||||||
# new level means in api_docs/changelog.md, as well as "**Changes**"
|
# new level means in api_docs/changelog.md, as well as "**Changes**"
|
||||||
# entries in the endpoint's documentation in `zulip.yaml`.
|
# 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
|
# 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
|
# only when going from an old version of the code to a newer version. Bump
|
||||||
|
|
|
@ -19,7 +19,11 @@ from zerver.lib.default_streams import get_default_streams_for_realm_as_dicts
|
||||||
from zerver.lib.exceptions import JsonableError
|
from zerver.lib.exceptions import JsonableError
|
||||||
from zerver.lib.external_accounts import get_default_external_accounts
|
from zerver.lib.external_accounts import get_default_external_accounts
|
||||||
from zerver.lib.hotspots import get_next_hotspots
|
from 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 (
|
from zerver.lib.message import (
|
||||||
add_message_to_unread_msgs,
|
add_message_to_unread_msgs,
|
||||||
aggregate_unread_data,
|
aggregate_unread_data,
|
||||||
|
@ -510,6 +514,8 @@ def fetch_initial_state_data(
|
||||||
state["realm_incoming_webhook_bots"] = [
|
state["realm_incoming_webhook_bots"] = [
|
||||||
{
|
{
|
||||||
"name": integration.name,
|
"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},
|
"config": {c[1]: c[0] for c in integration.config_options},
|
||||||
}
|
}
|
||||||
for integration in WEBHOOK_INTEGRATIONS
|
for integration in WEBHOOK_INTEGRATIONS
|
||||||
|
|
|
@ -11547,6 +11547,26 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
The name of the bot.
|
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:
|
config:
|
||||||
$ref: "#/components/schemas/Config"
|
$ref: "#/components/schemas/Config"
|
||||||
recent_private_conversations:
|
recent_private_conversations:
|
||||||
|
|
Loading…
Reference in New Issue