zulip/templates/zerver/api
Eeshan Garg af56df7723 webhooks: Enable custom topics and default PM notifications.
This commit adds a generic function called check_send_webhook_message
that does the following:
* If a stream is specified in the webhook URL, it sends a stream
  message, otherwise sends a PM to the owner of the bot.
* In the case of a stream message, if a custom topic is specified
  in the webhook URL, it uses that topic as the subject of the
  stream message.

Also, note that we need not test this anywhere except for the
helloworld webhook. Since helloworld is our default example for
webhooks, it is here to stay and it made sense that tests for a
generic function such as check_send_webhook_message be tested
with an actual generic webhook!

Fixes #8607.
2018-03-16 11:34:20 -07:00
..
add-subscriptions.md api docs: Test sample fixtures for unauthorized_errors_fatal. 2018-02-20 14:54:12 -08:00
api-keys.md /api/: Add Markdown-based /api-new documentation. 2017-10-30 22:32:43 -07:00
arguments.json api docs: Ensure consistent formatting for arguments.json. 2018-03-02 09:44:17 -08:00
common-error-payloads.md api docs: Test sample fixture for user not authorized error. 2018-02-20 14:52:09 -08:00
create-user.md api/create-user: Test fixture for "email already in use" error. 2018-02-20 14:54:12 -08:00
delete-queue.md api/delete-queue: Test fixture for BAD_EVENT_QUEUE_ID error. 2018-02-20 14:54:12 -08:00
fixtures.json json: Ensure consistent formatting in api/fixtures.json. 2018-03-02 14:10:53 -08:00
get-all-streams.md api docs: Test sample fixture for user not authorized error. 2018-02-20 14:52:09 -08:00
get-all-users.md bugdown/api_code_examples: Add support for multiple languages. 2018-02-16 10:07:13 -08:00
get-events-from-queue.md api_docs: Move get-events-from-queue fixture to fixtures.json. 2018-03-02 14:10:53 -08:00
get-profile.md bugdown/api_code_examples: Add support for multiple languages. 2018-02-16 10:07:13 -08:00
get-stream-id.md api docs: Test sample fixture for invalid stream name error. 2018-02-20 20:03:55 -03:30
get-subscribed-streams.md bugdown/api_code_examples: Add support for multiple languages. 2018-02-16 10:07:13 -08:00
index.md api docs: Remove old and outdated endpoint docs. 2018-01-04 10:17:29 -05:00
installation-instructions.md api: Move usage instructions to their own page. 2017-11-08 10:29:24 -08:00
integration-docs-guide.md docs: Fix formatting of integration-docs-guide.md 2017-11-22 10:29:07 -08:00
integration-guide.md api: Do paragraphs within bullets with better indentation. 2018-03-01 08:21:53 -08:00
main.html user docs: Add links back to homepage to the bottom of the sidebars. 2017-12-31 08:08:25 -05:00
missing.md /api/: Add Markdown-based /api-new documentation. 2017-10-30 22:32:43 -07:00
private-message.md api docs: Test sample fixture for invalid PM recipient error. 2018-02-20 14:52:09 -08:00
register-queue.md bugdown/api_code_examples: Add support for multiple languages. 2018-02-16 10:07:13 -08:00
remove-subscriptions.md api docs: Test sample fixture for nonexistent stream error. 2018-02-20 14:52:09 -08:00
render-message.md api docs: Test sample fixture for missing request args error. 2018-02-20 14:52:09 -08:00
running-bots.md docs: Improve consistency and quality of API Documentation. 2018-03-01 08:21:53 -08:00
sidebar.md api_docs: Document the `POST /api/v1/user_uploads` endpoint. 2018-03-02 09:44:17 -08:00
stream-message.md api docs: Test sample fixture for nonexistent stream error. 2018-02-20 14:52:09 -08:00
update-message.md api docs: Test sample fixture for message edit permission error. 2018-02-20 14:52:09 -08:00
upload-file.md api_docs: Document the `POST /api/v1/user_uploads` endpoint. 2018-03-02 09:44:17 -08:00
webhook-walkthrough.md webhooks: Enable custom topics and default PM notifications. 2018-03-16 11:34:20 -07:00
writing-bots.md docs: Improve consistency and quality of API Documentation. 2018-03-01 08:21:53 -08:00