Chat / JavaScript
Chat JavaScript v4
Chat JavaScript
Chat
JavaScript
Home
/
Chat
/
JavaScript
/
Report
This is the new Docs for Chat SDK v4 for JavaScript. To see the previous Docs, click here.

Report a message, user, or channel

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.

// 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

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.