Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

webhooks: Only enable webhook logging if it is a webhook.

Alex Vandiver1a763696f7ec
diff --git a/zerver/decorator.py b/zerver/decorator.py
index 78b038c74ad..82dee5e3bca 100644
--- a/zerver/decorator.py
+++ b/zerver/decorator.py
@@ -550,8 +550,8 @@ def authenticated_rest_api_view(
target_view_func = view_func
return target_view_func(request, profile, *args, **kwargs)
except Exception as err:
- if allow_webhook_access:
- if isinstance(err, UnsupportedWebhookEventType) and webhook_client_name is not None:
+ if webhook_client_name is not None:
+ if isinstance(err, UnsupportedWebhookEventType):
err.webhook_name = webhook_client_name
request_body = request.POST.get('payload')
if request_body is not None: