/ SDKs / iOS
SDKs
Chat SDKs iOS v4
Chat SDKs iOS
Chat SDKs
iOS
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.

// Report a message.
channel.report(message: MESSAGE_TO_REPORT, reportCategory: REPORT_CATEGORY, reportDescription: DESCRIPTION) { (error) in
    guard error == nil else {
        // Handle error.
        return
    }
}

// Report a user.
channel.report(offendingUser: OFFENDING_USER, reportCategory: REPORT_CATEGORY, reportDescription: DESCRIPTION) { (error) in
    guard error == nil else {
        // Handle error.
        return
    }
}

// Report a channel.
channel.report(category: REPORT_CATEGORY, reportDescription: DESCRIPTION) { (error) in
    guard error == nil else {
        // Handle error.
        return
    }
}

List of parameters

Copy link
Parameter nameTypeDescription

message

BaseMessage

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

offendingUser

User

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

category

ReportCategory

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

reportCategory

ReportCategory

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

reportDescription

String

Specifies additional information to include in the report.