-
Notifications
You must be signed in to change notification settings - Fork 46
Chat webhook moderation #3172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Chat webhook moderation #3172
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,40 @@ | ||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
| title: Webhook | ||||||||||||||||||||||||||
| meta_description: "Detect and remove unwanted content in a Chat Room using a custom webhook endpoint." | ||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| The webhook integration enables you to implement custom moderation by configuring an HTTP endpoint that Ably will invoke before messages are published to a chat room. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| This integration is useful when you want to: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| * Integrate with a custom moderation service hosted on your own infrastructure | ||||||||||||||||||||||||||
| * Implement your own moderation logic using any web server or serverless platform | ||||||||||||||||||||||||||
| * Use a moderation provider that isn't directly supported by Ably | ||||||||||||||||||||||||||
|
Comment on lines
+10
to
+12
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Integration setup <a id="setup"/> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Configure the integration in your [Ably dashboard](https://ably.com/accounts/any/apps/any/integrations) or using the [Control API](/docs/platform/account/control-api). | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| The following fields are specific to the webhook transport. You can also configure the [general fields](/docs/chat/moderation/custom#configuration). | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| | Field | Description | | ||||||||||||||||||||||||||
| | ----- | ----------- | | ||||||||||||||||||||||||||
| | URL | The endpoint URL that Ably will send moderation requests to. | | ||||||||||||||||||||||||||
| | Headers | Optional HTTP headers to include with requests. Use this to provide authorization credentials or other required headers. | | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Request and response <a id="request-response"/> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| The webhook transport uses the standard [request](/docs/chat/moderation/custom#request) and [response](/docs/chat/moderation/custom#response) formats for custom moderation. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| The HTTP status code is returned directly from your endpoint's response. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Best practice <a id="best-practice"/> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| When implementing your webhook endpoint, consider the following: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| * Keep your endpoint response time as low as possible to minimize latency | ||||||||||||||||||||||||||
| * Implement proper error handling and logging | ||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we mention about how to view errors from our side? |
||||||||||||||||||||||||||
| * Consider implementing rate limiting if you're using a third-party moderation service | ||||||||||||||||||||||||||
| * Use HTTPS to encrypt data in transit | ||||||||||||||||||||||||||
| * Authenticate requests using the headers field to prevent unauthorized access to your endpoint | ||||||||||||||||||||||||||
| * Consider implementing caching for frequently occurring content | ||||||||||||||||||||||||||
|
Comment on lines
+35
to
+40
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Comment on lines
+35
to
+40
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is 'frequently occurring content' a thing in moderation OOI? I think 'reoccurring' might read better if so. |
||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a
meta_keywordsplease?