zulip/zerver/webhooks/helloworld
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
..
fixtures webhooks: Rename webhook fixtures to only include event type. 2017-05-13 20:07:40 -02:30
__init__.py Make webhooks as separate modules with view and tests. 2017-01-25 23:14:19 -08:00
doc.md template context: Give better names to the URLs for the API. 2017-10-30 18:29:29 -07:00
tests.py webhooks: Enable custom topics and default PM notifications. 2018-03-16 11:34:20 -07:00
view.py webhooks: Enable custom topics and default PM notifications. 2018-03-16 11:34:20 -07:00