Chat / Android
Chat Android v4
Chat Android
Chat
Android
Home
/
Chat
/
Android
/
Report
This is the new Docs for Chat SDK v4 for Android. 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.
channel.reportMessage(message: MESSAGE_TO_REPORT, reportCategory: REPORT_CATEGORY, reportDescription: DESCRIPTION) { e ->
    if (e != null) {
        // Handle error.
    }

    // ...
}

// Report a user.
channel.reportUser(offendingUser: OFFENDING_USER, reportCategory: REPORT_CATEGORY, reportDescription: DESCRIPTION) { e ->
    if (e != null) {
        // Handle error.
    }

    // ...
}

// Report a channel.
channel.report(reportCategory: REPORT_CATEGORY, reportDescription: DESCRIPTION) { e ->
    if (e != null) {
        // Handle error.
    }

    // ...
}

List of parameters

Parameter nameTypeDescription

message

object

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

offendingUser

object

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

reportCategory

enum

Specifies a report category which indicates the reason for reporting. Acceptable values are limited to ReportCategory.SUSPICIOUS, ReportCategory.HARASSING, ReportCategory.INAPPROPRIATE, and ReportCategory.SPAM.

reportDescription

string

Specifies additional information to include in the report.