mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
webhooks: Remove repetitive argument to UnsupportedWebhookEventType.
The name of the webhook can be added by the webhook decorator.
This commit is contained in:
committed by
Tim Abbott
parent
e2ab7b9e17
commit
d04db7c5fe
@@ -30,7 +30,7 @@ def api_basecamp_webhook(request: HttpRequest, user_profile: UserProfile,
|
||||
event = get_event_type(payload)
|
||||
|
||||
if event not in SUPPORT_EVENTS:
|
||||
raise UnsupportedWebhookEventType('Basecamp', event)
|
||||
raise UnsupportedWebhookEventType(event)
|
||||
|
||||
subject = get_project_name(payload)
|
||||
if event.startswith('document_'):
|
||||
@@ -48,7 +48,7 @@ def api_basecamp_webhook(request: HttpRequest, user_profile: UserProfile,
|
||||
elif event.startswith('comment_'):
|
||||
body = get_comment_body(event, payload)
|
||||
else:
|
||||
raise UnsupportedWebhookEventType('Basecamp', event)
|
||||
raise UnsupportedWebhookEventType(event)
|
||||
|
||||
check_send_webhook_message(request, user_profile, subject, body)
|
||||
return json_success()
|
||||
|
||||
Reference in New Issue
Block a user