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/docs: Fix broken example view in webhooks reference.

sathwikshetty33a948613d190e
diff --git a/docs/webhooks/incoming-webhooks-reference.md b/docs/webhooks/incoming-webhooks-reference.md
index 70ee3ed12df..0a31d557bd9 100644
--- a/docs/webhooks/incoming-webhooks-reference.md
+++ b/docs/webhooks/incoming-webhooks-reference.md
@@ -194,11 +194,16 @@ For example, here is the definition of a webhook function that gets both
`stream` and `topic` from the query parameters:
```python
+@webhook_view("Querytest")
@typed_endpoint
-def api_querytest_webhook(request: HttpRequest, user_profile: UserProfile,
- payload: Annotated[str, ApiParamConfig(argument_type_is_body=True)],
- stream: str = "test",
- topic: str= "Default Alert":
+def api_querytest_webhook(
+ request: HttpRequest,
+ user_profile: UserProfile,
+ *,
+ payload: Annotated[str, ApiParamConfig(argument_type_is_body=True)],
+ stream: str = "test",
+ topic: str = "Default Alert",
+) -> HttpResponse:
```
In actual use, you might configure the third-party service to call your