/ SDKs / JavaScript
SDKs
Chat SDKs JavaScript v4
Chat SDKs JavaScript
Chat SDKs
JavaScript
Version 4

Report a message, user, or channel

Copy link

Users can report suspicious or harassing messages and other users who use abusive language in a channel. They can also report the channel itself if there is any inappropriate content or activity in the channel. Based on this functionality and our report API, you can build your own in-app system for managing objectionable content and subject.

JavaScriptTypeScript
// Report a message.
await channel.reportMessage(MESSAGE_TO_REPORT, REPORT_CATEGORY, DESCRIPTION);

// Report a user.
await channel.reportUser(OFFENDING_USER, REPORT_CATEGORY, DESCRIPTION);

// Report a channel.
await channel.report(REPORT_CATEGORY, DESCRIPTION);

List of arguments

Copy link
ArgumentTypeDescription

MESSAGE_TO_REPORT

object

Specifies the message to report for its suspicious, harassing, or inappropriate content.

OFFENDING_USER

object

Specifies the user who uses offensive or abusive language such as sending explicit messages or inappropriate comments.

REPORT_CATEGORY

enum

Specifies a report category which indicates the reason for reporting. Acceptable values are suspicious, harassing, inappropriate, and spam.

DESCRIPTION

string

Specifies additional information to include in the report.