zulip/zerver/webhooks/slack
Lauryn Menard 3a03e14938 integrations: Update Slack webhook to use check_send_webhook_message.
Due to the channel_map_to_topics URL parameter in the Slack webhook,
it was not migrated to use the check_send_webhook_message.

By using check_send_webhook_message, any topic parameter in the
webhook URL will be prioritized over mapping Slack channels to
topics, e.g. when channel_map_to_topics is true. This is because
the default behaviour for incoming webhooks is to send a default
topic as a parameter to check_send_webhook_message in case there
is no topic specified in the URL.

In contrast, we can override the stream passed in the URL when
channel_map_to_topics is false by passing the Slack channel name
to check_send_webhook_message. The default behaviour for incoming
webhooks is to send a direct message if there is no specified
stream in the URL, so a default stream is not generally passed
to check_send_webhook_message.

Fixes #27601.
2024-02-25 16:47:34 -08:00
..
fixtures
__init__.py
doc.md integrations: Update Slack webhook to use check_send_webhook_message. 2024-02-25 16:47:34 -08:00
tests.py integrations: Update Slack webhook to use check_send_webhook_message. 2024-02-25 16:47:34 -08:00
view.py integrations: Update Slack webhook to use check_send_webhook_message. 2024-02-25 16:47:34 -08:00