zulip/zerver/webhooks
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
..
airbrake webhooks/airbrake: Combine instructions into 4 steps. 2018-02-24 06:21:02 -05:00
appfollow webhooks/appfollow: Update text to conform to doc style guide. 2018-03-08 08:19:32 -08:00
basecamp webhooks/basecamp: Update text to conform to doc style guide. 2018-03-08 08:19:32 -08:00
beanstalk mypy: Centralize ViewFuncT definition into new file zerver/lib/types.py. 2018-03-15 14:16:40 -07:00
beeminder webhooks/beeminder: Mock time.time() to avoid race. 2018-03-09 11:12:40 -08:00
bitbucket mypy: Use Python 3 type syntax in 'bitbucket/tests.py'. 2017-12-26 08:34:38 -05:00
bitbucket2 mypy: Final small migrations to python3.5 annotations in many files. 2018-03-12 11:23:30 -07:00
circleci webhooks/circleci: Reformat documentation steps into numbered list. 2018-02-08 17:45:56 -08:00
codeship webhooks/codeship: Update text to conform to doc style guide. 2018-03-08 08:19:32 -08:00
crashlytics webhooks/crashlytics: Update the text. 2018-03-06 12:52:22 -08:00
delighted webhooks/delighted: Update text to conform to doc style guide. 2018-03-08 08:19:32 -08:00
deskdotcom mypy: Use Python 3 type syntax in zerver/webhooks/deskdotcom/view.py. 2018-01-23 08:37:56 -08:00
dropbox webhooks/dropbox: Update text to conform to doc style guide. 2018-03-08 08:19:32 -08:00
facebook webhooks: Add Facebook integration. 2018-02-19 09:41:49 -08:00
flock webhooks/flock: Add flock integration. 2018-03-11 20:31:13 -07:00
freshdesk tests: Replace api_auth usages with auth methods in zerver/webhooks. 2017-12-18 09:24:09 -05:00
front integrations: Add documentation for Front. 2018-02-28 16:18:19 -05:00
gci webhooks/gci: Update text to conform to doc style guide. 2018-03-08 08:19:32 -08:00
github mypy: Use Python 3 type syntax in several files. 2017-12-30 07:34:51 -05:00
github_webhook minor: Request parameter should be of type HttpRequest. 2018-03-15 14:33:53 -07:00
gitlab mypy: Final small migrations to python3.5 annotations in many files. 2018-03-12 11:23:30 -07:00
gogs webhooks/gogs: Update text to conform to doc style guide. 2018-03-08 08:19:32 -08:00
gosquared webhooks/gosquared: Update text to conform to doc style guide. 2018-03-08 08:19:32 -08:00
greenhouse mypy: Use Python 3 type syntax in zerver/webhooks/greenhouse/view.py. 2017-12-18 11:32:52 -05:00
groove integrations: Add documentation for Groove. 2018-01-17 13:00:11 -05:00
hellosign webhooks/hellosign: Update text to conform to doc style guide. 2018-03-08 08:19:32 -08:00
helloworld webhooks: Enable custom topics and default PM notifications. 2018-03-16 11:34:20 -07:00
heroku webhooks/heroku: Update text to conform to new style guide. 2018-03-14 18:13:13 -07:00
homeassistant mypy: Use Python 3 type syntax in zerver/webhooks/homeassistant/view.py. 2017-12-05 16:32:18 -08:00
honeybadger/fixtures inetgrations: Add webhook payloads for Honeybadger. 2018-01-02 11:45:33 -05:00
ifttt webhooks/ifttt: Update text to conform to doc style guide. 2018-03-13 20:12:26 -07:00
insping webhooks/insping: Update text to conform to style guide. 2018-03-13 20:12:26 -07:00
intercom webhooks: Create Intercom integration and docs. 2018-01-16 08:51:17 -05:00
jira mypy: Use Python 3 type syntax in zerver/webhooks/jira/view.py. 2017-12-11 20:27:55 -08:00
librato mypy: Use Python 3 type syntax in zerver/webhooks/librato/view.py. 2018-01-23 08:37:56 -08:00
mention mypy: Amend topic REQ parameters in helloworld/mention webhooks. 2018-02-13 11:40:52 -08:00
newrelic mypy: Use Python 3 type syntax in zerver/webhooks/newrelic/view.py. 2017-12-05 16:32:18 -08:00
opbeat integrations: Add documentation for Opbeat. 2018-01-17 09:17:19 -05:00
opsgenie mypy: Use Python 3 type syntax in zerver/webhooks/opsgenie/view.py. 2017-12-18 11:32:52 -05:00
pagerduty mypy: Use Python 3 type syntax in several files. 2017-12-30 07:34:51 -05:00
papertrail mypy: Use Python 3 type syntax in zerver/webhooks/papertrail/view.py. 2017-12-11 20:27:55 -08:00
pingdom mypy: Use Python 3 type syntax in zerver/webhooks/pingdom/view.py. 2017-12-18 11:32:52 -05:00
pivotal python: Sort imports in webhooks. 2017-11-15 15:43:10 -08:00
raygun integrations: Add documentation for Raygun. 2018-01-17 12:53:22 -05:00
rollbar/fixtures integrations: Add webhook payloads for rollbar. 2018-01-11 06:32:37 -05:00
runscope/fixtures integrations: Add webhook payloads for Runscope. 2017-12-29 07:27:20 -05:00
semaphore mypy: Use Python 3 type syntax in zerver/webhooks/semaphore/view.py. 2017-12-03 13:48:18 -08:00
sentry mypy: Use Python 3 type syntax in `zerver/webhooks/sentry/view.py`. 2017-12-22 08:17:00 -05:00
slack mypy: Use Python 3 type syntax in zerver/webhooks/slack/view.py. 2017-12-26 08:34:06 -05:00
solano Add underscores to thumbs_up and thumbs_down emoji 2018-02-07 11:55:02 -08:00
splunk mypy: Use Python 3 type syntax in zerver/webhooks/splunk/view.py. 2017-12-26 08:34:06 -05:00
stash/fixtures webhooks: Rename webhook fixtures to only include event type. 2017-05-13 20:07:40 -02:30
statuspage integration: Add statuspage.io webhook integration. 2018-02-07 09:59:12 -08:00
statuspage.io/fixtures integrations: Add webhook payloads for StatusPage.io. 2017-12-28 15:53:06 -05:00
stripe mypy: Use Python 3 type syntax in stripe/view.py 2017-12-11 20:33:00 -08:00
taiga webhooks/taiga: Update text to conform to the new style guide. 2018-03-14 18:13:13 -07:00
teamcity Add underscores to thumbs_up and thumbs_down emoji 2018-02-07 11:55:02 -08:00
transifex mypy: Use Python 3 type syntax in zerver/webhooks/transifex/view.py 2017-12-26 08:30:33 -05:00
travis webhooks/travis: Update text to conform to doc style guide. 2018-03-13 20:15:04 -07:00
trello mypy: Use Python 3 type syntax in zerver/webhooks/trello/tests.py. 2017-12-09 16:50:12 -08:00
updown mypy: Use Python 3 type syntax in several files. 2017-12-30 07:34:51 -05:00
wordpress mypy: Use Python 3 type syntax in wordpress/view.py 2017-12-11 20:33:00 -08:00
yo mypy: Use Python 3 type syntax in `zerver/webhooks/yo/view.py`. 2017-12-22 08:17:00 -05:00
zapier webhooks/zapier: Update text to conform to doc style guide. 2018-03-13 20:12:26 -07:00
zendesk mypy: Use Python 3 type syntax in zerver/webhooks/zendesk/view.py. 2018-01-23 08:37:56 -08:00
__init__.py
github_dispatcher.py mypy: Apply type: ignore to api_github_webhook_dispatch calls. 2018-03-15 14:33:56 -07:00