derAnfaenger
3264e4f24a
Remove superfluous queue_json_publish imports.
2017-10-19 13:57:54 -07:00
Robert Hönig
9d4bffb59d
outgoing webhook: Make exception handling more granular and verbose.
...
Fixes #6127 .
2017-09-30 10:14:28 -07:00
Robert Hönig
93ebd1660f
outgoing webhook: Make notify_bot_owner mypy annotation more specific.
2017-09-30 10:12:31 -07:00
Robert Hönig
ba598def0b
outgoing webhook: Don't retry on 50x response.
...
This reverts one retry case introduced in 53a8b2a
.
2017-09-30 10:12:31 -07:00
rht
f43e54d352
zerver/lib: Remove absolute_import.
2017-09-27 10:00:39 -07:00
Robert Hönig
43422fa6f2
outgoing webhook: Notify bot owner on failure response.
2017-09-26 16:11:27 -07:00
Tim Abbott
4674af0894
outgoing_webhook: Fix broken way of accessing realm.uri.
...
Previously, this accessed realm.uri via trying to use
zulip_default_context. That doesn't make any sense, because
zulip_default_context expects an HttpRequest object, and those are
nowhere in sight in the code path. We do, however, have the outgoing
webhook bot user involved in the event, and that's the object to
access realm.uri from here.
2017-09-25 07:05:02 -07:00
Robert Hönig
51657cadf0
outgoing_webhook: De-bug send_response_message().
...
This removes the unnecessary forwarder_user_profile argument
and adds an error message in case the recipient type is invalid.
2017-09-25 06:00:42 -07:00
Robert Hönig
15a1bf2b58
outgoing webhook: Log all non-200 responses.
2017-09-25 06:00:42 -07:00
Tim Abbott
522562f68f
outgoing_webhook: Stop using get_realm_by_email_domain.
...
There was no reason to do a complicated lookup to get the realm here.
2017-08-24 20:27:00 -07:00
Umair Khan
62cae23601
queue: Extract event retry into retry_event().
...
This commit takes the code from zerver.lib.outgoing_webhook.request_retry
and creates a new generic function called retry_event.
2017-08-22 11:16:48 -07:00
neiljp (Neil Pilgrim)
3711da0dc9
mypy: Mark request_data as Optional based on requests API.
2017-08-07 21:27:50 -07:00
Elliott Jin
fcb889c5c0
outgoing webhooks: Remove process_failure interface method.
2017-07-24 14:10:14 -07:00
Elliott Jin
fdc9294a6e
outgoing webhooks: Don't call *_with_message if message is None.
2017-07-24 14:10:14 -07:00
Elliott Jin
3d815bcea9
outgoing webhooks: Return None instead of "" in process_success.
2017-07-24 14:10:14 -07:00
Elliott Jin
b53be0accc
outgoing webhooks: Clean up interface comments.
2017-07-24 14:10:14 -07:00
Elliott Jin
6a61a8a431
outgoing webhooks: Consolidate interfaces into lib/outgoing_webhook.py
2017-07-24 14:10:14 -07:00
vaibhav
87dcd5442a
outgoing webhook system: Minor fixes.
...
This fixes some error message strings and skips converting request_data
into json. From now, conversion would be the responsibility of interface.
Also, base_url is now not passed into event structure.
2017-07-24 14:10:14 -07:00
vaibhav
ff63f0b1d3
Return response string instead of dict() from process_success, process_failure.
2017-07-24 14:10:14 -07:00
vaibhav
7f9b4d3a94
Outgoing Webhook System: Add usage of Interfaces in DoRestCall.
2017-06-28 11:11:21 -04:00
vaibhav
a60552930e
Outgoing Webhook System: Add base interface class and Generic class.
2017-06-28 11:11:21 -04:00
vaibhav
dbc56e29a5
bots: Add simple flask server for running contrib bots.
2017-06-12 22:08:44 -07:00
Tim Abbott
f7b604f9be
webhooks: Fix unnecessary/buggy translation string.
2017-06-06 11:59:36 -07:00
vaibhav
53a8b2ac87
Outgoing Webhook System: Add DoRestCall and helper functions
2017-05-23 08:19:16 -07:00