Chat / Flutter
Chat Flutter v3
Chat Flutter
Chat
Flutter
Version 3
Home
/
Chat
/
Flutter
/
Report

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.

// Report a message in a channel. 
// channel below can be openChannel or groupChannel.
try {
    await channel.reportMessage(
        message: MESSAGE_TO_REPORT,
        category: REPORT_CATEGORY,
        description: DESCRIPTION
    );
} catch (e) {
    // Handle error.
}

// Report a user in a channel.
// channel below can be openChannel or groupChannel.
try {
    await channel.reportUser(
        userId: OFFENDING_USER_ID,
        category: REPORT_CATEGORY,
        description: DESCRIPTION
    );
} catch (e) {
    // Handle error.
}

// Report a channel.
// channel below can be openChannel or groupChannel.
try {
    await channel.reportChannel(
        category: REPORT_CATEGORY,
        description: DESCRIPTION
    );
} catch (e) {
    // Handle error.

List of parameters

Copy link
Parameter nameTypeDescription

message

BaseMessage

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

userId

String

Specifies the user ID who uses offensive or abusive language, such as sending explicit messages.

category

enum

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

description

String?

Specifies additional information or note to include in the report.