/ SDKs / Unity
SDKs
Chat SDKs Unity v4
Chat SDKs Unity
Chat SDKs
Unity
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 channel.
channel.Report(REPORT_CATEGORY, DESCRIPTION, (inError) =>
{
    if (inError != null)
    {
        return; // Handle error.
    }
});

// Report a message.
channel.ReportMessage(MESSAGE_TO_REPORT, REPORT_CATEGORY, DESCRIPTION, (inError) =>
{
    if (inError != null)
    {
        return; // Handle error.
    }
});
        
// Report a user.
channel.ReportUser(OFFENDING_USER, REPORT_CATEGORY, DESCRIPTION, (inError) =>
{
    if (inError != null)
    {
        return; // Handle error.
    }
});

List of parameters

Copy link
Parameter nameTypeDescription

inReportCategory

SbReportCategory

Specifies a report category which indicates the reason for reporting. Acceptable values are Suspicious, Harassing, Spam and Inappropriate.

inMessage

SbBaseMessage

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

inOffendingUser

SbUser

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

inReportDescription

string

Specifies additional information or note to include in the report.