ChannelHandler

ChannelHandler

Class for handling events in the channel. You can override necessary methods with desired behavior. To activate channel handler in SendBird application, use sendbird.addChannelHandler(). To remove it, use sendbird.removeChannelHandler(), to remove all use sendbird.removeAllChangeHandlers()

Methods

onChannelChanged(channel)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel | module:model/groupChannel~GroupChannel

onChannelDeleted(channelUrl, channelType)

Parameters:
Name Type Description
channelUrl string
channelType string

onChannelFrozen(channel)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel | module:model/groupChannel~GroupChannel

onChannelHidden(channel)

Parameters:
Name Type Description
channel module:model/groupChannel~GroupChannel

onChannelMemberCountChanged(channels)

Parameters:
Name Type Description
channels Array.<module:model/groupChannel~GroupChannel>

onChannelParticipantCountChanged(channels)

Parameters:
Name Type Description
channels Array.<module:model/openChannel~OpenChannel>

onChannelUnfrozen(channel)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel | module:model/groupChannel~GroupChannel

onDeliveryReceiptUpdated(channel)

Parameters:
Name Type Description
channel module:model/groupChannel~GroupChannel

onMentionReceived(channel, message)

Parameters:
Name Type Description
channel module:model/groupChannel~GroupChannel | module:model/openChannel~OpenChannel
message module:model/adminMessage~AdminMessage | module:model/userMessage~UserMessage | module:model/fileMessage~FileMessage

onMessageDeleted(channel, messageId)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel | module:model/groupChannel~GroupChannel
messageId number

onMessageReceived(channel, message)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel | module:model/groupChannel~GroupChannel
message module:model/adminMessage~AdminMessage | module:model/userMessage~UserMessage | module:model/fileMessage~FileMessage

onMessageUpdated(channel, message)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel | module:model/groupChannel~GroupChannel
message module:model/adminMessage~AdminMessage | module:model/userMessage~UserMessage | module:model/fileMessage~FileMessage

onMetaCountersCreated(channel, metaCounter)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel | module:model/groupChannel~GroupChannel
metaCounter Object

onMetaCountersDeleted(channel, metaCounterKeys)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel | module:model/groupChannel~GroupChannel
metaCounterKeys Array.<string>

onMetaCountersUpdated(channel, metaCounter)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel | module:model/groupChannel~GroupChannel
metaCounter Object

onMetaDataCreated(channel, metaData)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel | module:model/groupChannel~GroupChannel
metaData Object

onMetaDataDeleted(channel, metaDataKeys)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel | module:model/groupChannel~GroupChannel
metaDataKeys Array.<string>

onMetaDataUpdated(channel, metaData)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel | module:model/groupChannel~GroupChannel
metaData Object

onOperatorUpdated(channel, operators)

Parameters:
Name Type Description
channel module:model/groupChannel~GroupChannel
operators Array.<module:model/user~User>

onPollUpdated(event)

Parameters:
Name Type Description
event module:model/event/pollUpdateEvent~PollUpdateEvent

onPollVoted(event)

Parameters:
Name Type Description
event module:model/event/pollVoteEvent~PollVoteEvent

onReactionUpdated(channel, event)

Parameters:
Name Type Description
channel module:model/groupChannel~GroupChannel
event module:model/reactionEvent~ReactionEvent

onReadReceiptUpdated(channel)

Parameters:
Name Type Description
channel module:model/groupChannel~GroupChannel

onThreadInfoUpdated(channel, event)

Parameters:
Name Type Description
channel module:model/groupChannel~GroupChannel
event module:model/event/threadInfoUpdateEvent~ThreadInfoUpdateEvent

onTypingStatusUpdated(channel)

Parameters:
Name Type Description
channel module:model/groupChannel~GroupChannel

onUserBanned(channel, user)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel | module:model/groupChannel~GroupChannel
user module:model/user~User

onUserDeclinedInvitation(channel, inviter, invitee)

Parameters:
Name Type Description
channel module:model/groupChannel~GroupChannel
inviter module:model/user~User
invitee module:model/user~User

onUserEntered(channel, user)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel
user module:model/user~User

onUserExited(channel, user)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel
user module:model/user~User

onUserJoined(channel, user)

Parameters:
Name Type Description
channel module:model/groupChannel~GroupChannel
user module:model/user~User

onUserLeft(channel, user)

Parameters:
Name Type Description
channel module:model/groupChannel~GroupChannel
user module:model/user~User

onUserMuted(channel, user)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel | module:model/groupChannel~GroupChannel
user module:model/user~User

onUserReceivedInvitation(channel, inviter, invitees)

Parameters:
Name Type Description
channel module:model/groupChannel~GroupChannel
inviter module:model/user~User
invitees Array.<module:model/user~User>

onUserUnbanned(channel, user)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel | module:model/groupChannel~GroupChannel
user module:model/user~User

onUserUnmuted(channel, user)

Parameters:
Name Type Description
channel module:model/openChannel~OpenChannel | module:model/groupChannel~GroupChannel
user module:model/user~User