Sendbird Chat SDK for Unity
SbOpenChannel

The SbOpenChannel class represents a open channel which is a public chat. More...

Inheritance diagram for SbOpenChannel:
SbBaseChannel

Public Member Functions

void Enter (SbErrorHandler inCompletionHandler)
 Enters this channel. More...
 
void Exit (SbErrorHandler inCompletionHandler)
 Exits this channel. More...
 
void UpdateChannel (SbOpenChannelUpdateParams inChannelUpdateParams, SbOpenChannelCallbackHandler inCompletionHandler)
 Updates this channel with SbOpenChannelUpdateParams class. More...
 
void Delete (SbErrorHandler inCompletionHandler)
 Deletes this channel More...
 
void Refresh (SbErrorHandler inCompletionHandler)
 Refreshes the channel information. More...
 
bool IsOperator (SbUser inUser)
 Returns the user is an operator or not. More...
 
bool IsOperator (string inUserId)
 Returns the user ID is an operator or not. More...
 
SbParticipantListQuery CreateParticipantListQuery (SbParticipantListQueryParams inParams)
 Creates a participant list query for this channel. More...
 
- Public Member Functions inherited from SbBaseChannel
SbUserMessage SendUserMessage (string inMessage, SbUserMessageHandler inCompletionHandler)
 Sends a user message. More...
 
SbUserMessage SendUserMessage (SbUserMessageCreateParams inUserMessageCreateParams, SbUserMessageHandler inCompletionHandler)
 Sends a string message of params. More...
 
SbUserMessage ResendUserMessage (SbUserMessage inUserMessage, SbUserMessageHandler inCompletionHandler)
 Attempts to resend a failed user message received by the failure callback. Only failed message MUST be passed, not a succeeded message or a pending message. More...
 
void UpdateUserMessage (long inMessageId, SbUserMessageUpdateParams inParams, SbUserMessageHandler inCompletionHandler)
 Updates a user message. The text message, data, custom type from user message params can be updated. More...
 
SbUserMessage CopyUserMessage (SbUserMessage inUserMessage, SbBaseChannel inToTargetChannel, SbUserMessageHandler inCompletionHandler)
 Copies a user message to the target channel. More...
 
void TranslateUserMessage (SbUserMessage inUserMessage, List< string > inTargetLanguages, SbUserMessageHandler inCompletionHandler)
 Requests to translate the text message into the target languages. More...
 
SbFileMessage SendFileMessage (SbFileMessageCreateParams inFileMessageCreateParams, SbMultiProgressHandler inProgressHandler, SbFileMessageHandler inCompletionHandler)
 Sends a file message with file or file URL of params with progress. If the params has a binary file, it will upload data to Sendbird storage. If not, the params has a file url, it will send a message with file url. More...
 
SbFileMessage ResendFileMessage (SbFileMessage inFileMessage, SbFileInfo inFileInfo, SbMultiProgressHandler inProgressHandler, SbFileMessageHandler inCompletionHandler)
 Attempts to resend a failed file message received by the failure callback. More...
 
void UpdateFileMessage (long inMessageId, SbFileMessageUpdateParams inParams, SbFileMessageHandler inCompletionHandler)
 Updates a file message. The data, custom type from file message params can be updated. More...
 
SbFileMessage CopyFileMessage (SbFileMessage inFileMessage, SbBaseChannel inToTargetChannel, SbFileMessageHandler inCompletionHandler)
 Copies a file message to the target channel. More...
 
bool CancelUploadingFileMessage (string inRequestId)
 Cancels an ongoing FileMessage upload. More...
 
void DeleteMessage (long inMessageId, SbErrorHandler inCompletionHandler)
 Deletes a message with message ID. More...
 
void GetMessagesByTimestamp (long inTimestamp, SbMessageListParams inParams, SbMessageListHandler inCompletionHandler)
 Retrieves previous or next messages based on the timestamp in a specific channel. The result is passed to handler as list. More...
 
void GetMessagesByMessageId (long inMessageId, SbMessageListParams inParams, SbMessageListHandler inCompletionHandler)
 Retrieves previous or next messages based on the message ID in a specific channel. The result is passed to handler as list. More...
 
void CreateMetaData (Dictionary< string, string > inMetaData, SbMetaDataHandler inCompletionHandler)
 Creates meta data. This can be used to customize the channel. More...
 
void GetMetaData (List< string > inKeys, SbMetaDataHandler inCompletionHandler)
 Gets the meta data for the channel. More...
 
void GetAllMetaData (SbMetaDataHandler inCompletionHandler)
 Gets all meta data for the channel. More...
 
void UpdateMetaData (Dictionary< string, string > inMetaData, SbMetaDataHandler inCompletionHandler)
 Updates the meta data for the channel. More...
 
void DeleteMetaData (string inKey, SbErrorHandler inCompletionHandler)
 Deletes meta data with key for the channel. More...
 
void DeleteAllMetaData (SbErrorHandler inCompletionHandler)
 Deletes all meta data for the channel. More...
 
void CreateMetaCounters (Dictionary< string, int > inMetaCounters, SbMetaCountersHandler inCompletionHandler)
 Creates the meta counters for the channel. More...
 
void GetMetaCounters (List< string > inKeys, SbMetaCountersHandler inCompletionHandler)
 Gets the meta counters with keys for the channel. More...
 
void GetAllMetaCounters (SbMetaCountersHandler inCompletionHandler)
 
void UpdateMetaCounters (Dictionary< string, int > inMetaCounters, SbMetaCountersHandler inCompletionHandler)
 Gets all meta counters for the channel. More...
 
void IncreaseMetaCounters (Dictionary< string, int > inMetaCounters, SbMetaCountersHandler inCompletionHandler)
 Increases the meta counters for the channel. More...
 
void DecreaseMetaCounters (Dictionary< string, int > inMetaCounters, SbMetaCountersHandler inCompletionHandler)
 Decreases the meta counters for the channel. More...
 
void DeleteMetaCounters (string inKey, SbErrorHandler inCompletionHandler)
 Deletes the meta counters with key for the channel. More...
 
void DeleteAllMetaCounters (SbErrorHandler inCompletionHandler)
 Deletes all meta counters for the channel. More...
 
SbOperatorListQuery CreateOperatorListQuery (SbOperatorListQueryParams inParams=null)
 Creates a query instance to get the operator list from this channel. More...
 
SbPreviousMessageListQuery CreatePreviousMessageListQuery (SbPreviousMessageListQueryParams inParams=null)
 Creates previous message list query for this channel. More...
 
void GetMessageChangeLogsSinceTimestamp (long inTimestamp, SbMessageChangeLogsParams inParams, SbMessageChangeLogHandler inCompletionHandler)
 Requests message change logs after given timestamp. The result is passed to handler. More...
 
void GetMessageChangeLogsSinceToken (string inToken, SbMessageChangeLogsParams inParams, SbMessageChangeLogHandler inCompletionHandler)
 Requests message change logs after given token. The result is passed to handler. More...
 
SbBannedUserListQuery CreateBannedUserListQuery (SbBannedUserListQueryParams inParams)
 Creates a query instance for banned user list of the channel. More...
 
SbMutedUserListQuery CreateMutedUserListQuery (SbMutedUserListQueryParams inParams)
 Creates a query instance for getting muted user list of the channel instance. More...
 
void BanUser (string inUserId, int inSeconds, string inDescription, SbErrorHandler inCompletionHandler)
 Bans a user for seconds. Let a user out and prevent to join again. If the user is already banned, duration will be updated from the time that was initialized. More...
 
void UnbanUser (string inUserId, SbErrorHandler inCompletionHandler)
 Removes ban for a user. More...
 
void MuteUser (string inUserId, int inSeconds, string inDescription, SbErrorHandler inCompletionHandler)
 Mutes a user for seconds. Muted user cannot send any messages to the group channel. More...
 
void UnmuteUser (string inUserId, SbErrorHandler inCompletionHandler)
 Unmutes a user. More...
 
void GetMyMutedInfo (SbMuteInfoHandler inCompletionHandler)
 Gets my muted information in this channel. More...
 
void AddOperators (List< string > inUserIds, SbErrorHandler inCompletionHandler)
 Add operators to the channel. More...
 
void RemoveOperators (List< string > inUserIds, SbErrorHandler inCompletionHandler)
 Remove operators from the channel. More...
 
void RemoveAllOperators (SbErrorHandler inCompletionHandler)
 Remove all operators from the channel. See https://docs.sendbird.com/platform/user_type#3_operator for the explanations on the operators. More...
 
void AddReaction (SbBaseMessage inMessage, string inKey, SbReactionEventHandler inCompletionHandler)
 Adds a reaction to a message. More...
 
void DeleteReaction (SbBaseMessage inMessage, string inKey, SbReactionEventHandler inCompletionHandler)
 Deletes a reaction from a message. More...
 
void CreateMessageMetaArrayKeys (SbBaseMessage inMessage, List< string > inKeys, SbBaseMessageHandler inCompletionHandler)
 Creates keys of meta array for the message. More...
 
void DeleteMessageMetaArrayKeys (SbBaseMessage inMessage, List< string > inKeys, SbBaseMessageHandler inCompletionHandler)
 Deletes keys from meta array of the message. More...
 
void AddMessageMetaArrayValues (SbBaseMessage inMessage, List< SbMessageMetaArray > inMetaArrays, SbBaseMessageHandler inCompletionHandler)
 Adds meta array to the message. More...
 
void RemoveMessageMetaArrayValues (SbBaseMessage inMessage, List< SbMessageMetaArray > inMetaArrays, SbBaseMessageHandler inCompletionHandler)
 Removes meta array from the message. More...
 
void ReportUser (SbUser inOffendingUser, SbReportCategory inReportCategory, string inReportDescription, SbErrorHandler inCompletionHandler)
 Reports a user in a channel of inappropriate activities. More...
 
void ReportMessage (SbBaseMessage inMessage, SbReportCategory inReportCategory, string inReportDescription, SbErrorHandler inCompletionHandler)
 Reports a malicious message in the channel More...
 
void Report (SbReportCategory inReportCategory, string inReportDescription, SbErrorHandler inCompletionHandler)
 Reports current channel instance of inappropriate activities. More...
 

Properties

override SbChannelType ChannelType [get]
 
IReadOnlyList< SbUserOperators [get]
 The operators of this channel. More...
 
int ParticipantCount [get, set]
 The number of participants in this channel. More...
 
- Properties inherited from SbBaseChannel
string Url [get]
 The unique channel URL. More...
 
abstract SbChannelType ChannelType [get]
 
IReadOnlyDictionary< string, string > CachedMetaData [get]
 All locally cached metadata as a map. Cached metadata is updated under following circumstances: More...
 
string CoverUrl [get]
 The cover image URL. More...
 
long CreatedAt [get]
 The creation time of the channel. More...
 
string Data [get]
 The channel data. More...
 
bool IsEphemeral [get]
 Whether the channel is ephemeral. More...
 
bool IsFrozen [get, set]
 Whether the channel is frozen. More...
 
string Name [get]
 The topic or name of the channel. More...
 
string CustomType [get]
 The custom type of the channel. More...
 
bool IsGroupChannel [get]
 Whether the instance is SbGroupChannel type. More...
 
bool IsOpenChannel [get]
 Whether the instance is SbOpenChannel type. More...
 

Detailed Description

The SbOpenChannel class represents a open channel which is a public chat.

Since
4.0.0

Member Function Documentation

◆ CreateParticipantListQuery()

SbParticipantListQuery CreateParticipantListQuery ( SbParticipantListQueryParams  inParams)

Creates a participant list query for this channel.

Parameters
inParams
Returns
Since
4.0.0

◆ Delete()

void Delete ( SbErrorHandler  inCompletionHandler)

Deletes this channel

Parameters
inCompletionHandler
Since
4.0.0

◆ Enter()

void Enter ( SbErrorHandler  inCompletionHandler)

Enters this channel.

Parameters
inCompletionHandler
Since
4.0.0

◆ Exit()

void Exit ( SbErrorHandler  inCompletionHandler)

Exits this channel.

Parameters
inCompletionHandler
Since
4.0.0

◆ IsOperator() [1/2]

bool IsOperator ( SbUser  inUser)

Returns the user is an operator or not.

Parameters
inUser
Returns
Since
4.0.0

◆ IsOperator() [2/2]

bool IsOperator ( string  inUserId)

Returns the user ID is an operator or not.

Parameters
inUserId
Returns
Since
4.0.0

◆ Refresh()

void Refresh ( SbErrorHandler  inCompletionHandler)

Refreshes the channel information.

Parameters
inCompletionHandler
Since
4.0.0

◆ UpdateChannel()

void UpdateChannel ( SbOpenChannelUpdateParams  inChannelUpdateParams,
SbOpenChannelCallbackHandler  inCompletionHandler 
)

Updates this channel with SbOpenChannelUpdateParams class.

Parameters
inChannelUpdateParams
inCompletionHandler
Since
4.0.0

Property Documentation

◆ ChannelType

override SbChannelType ChannelType
get

Since
4.0.0

◆ Operators

IReadOnlyList<SbUser> Operators
get

The operators of this channel.

Since
4.0.0

◆ ParticipantCount

int ParticipantCount
getset

The number of participants in this channel.

Since
4.0.0