Chat / iOS
Chat iOS v4
Chat iOS
Chat
iOS
Home
/
Chat
/
iOS
/
Report
This is the new Docs for Chat SDK v4 for iOS. 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.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

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.