SBDChannelDelegate Protocol Reference

Conforms to NSObject
Declared in SBDBaseChannel.h

Overview

An object that adopts the SBDChannelDelegate protocol is responsible for receiving the events in the channel. Some of delegate methods are common for the SBDBaseChannel. However, there are delegate methods for the SBDOpenChannel and SBDGroupChannel exclusive. The SBDChannelDelegate can be added by addChannelDelegate:identifier: in SBDMain. Every SBDChannelDelegate method which is added is going to receive events.

Warning: If the object that adopts the SBDChannelDelegate protocol is invalid, the delegate has to be removed by the identifier via removeChannelDelegateForIdentifier: in SBDMain. If you miss this, it will cause the crash.

This protocol deals with the below events.

– channel:didReceiveMessage:

A callback when a message is received.

- (void)channel:(SBDBaseChannel *_Nonnull)sender didReceiveMessage:(SBDBaseMessage *_Nonnull)message

Parameters

sender

The channel where the message is received.

message

The received message.

Declared In

SBDBaseChannel.h

– channel:didUpdateMessage:

A callback when a message is updated.

- (void)channel:(SBDBaseChannel *_Nonnull)sender didUpdateMessage:(SBDBaseMessage *_Nonnull)message

Parameters

sender

The channel where the message is updated.

message

The updated message.

Declared In

SBDBaseChannel.h

– channel:didReceiveMention:

A delegate is called when someone mentioned the user.

- (void)channel:(nonnull SBDBaseChannel *)channel didReceiveMention:(nonnull SBDBaseMessage *)message

Parameters

channel

The channel mention was occured in.

message

The message mention was occured about.

Declared In

SBDBaseChannel.h

– channelDidUpdateReadReceipt:

A callback when read receipts updated.

- (void)channelDidUpdateReadReceipt:(SBDGroupChannel *_Nonnull)sender

Parameters

sender

The group channel where the read receipt updated.

Declared In

SBDBaseChannel.h

– channelDidUpdateTypingStatus:

A callback when user sends typing status.

- (void)channelDidUpdateTypingStatus:(SBDGroupChannel *_Nonnull)sender

Parameters

sender

The group channel where the typing status updated.

Declared In

SBDBaseChannel.h

– channel:didReceiveInvitation:inviter:

A callback when users are invited by inviter.

- (void)channel:(SBDGroupChannel *_Nonnull)sender didReceiveInvitation:(NSArray<SBDUser*> *_Nullable)invitees inviter:(SBDUser *_Nullable)inviter

Parameters

sender

The group channel where the invitation is occured.

invitees

Invitees.

inviter

Inviter. It can be nil.

Declared In

SBDBaseChannel.h

– channel:didDeclineInvitation:inviter:

A callback when user declined the invitation.

- (void)channel:(SBDGroupChannel *_Nonnull)sender didDeclineInvitation:(SBDUser *_Nonnull)invitee inviter:(SBDUser *_Nullable)inviter

Parameters

sender

The group channel where the invitation is occured.

invitee

Inviter. It can be nil.

inviter

Invitee.

Declared In

SBDBaseChannel.h

– channel:userDidJoin:

A callback when new member joined to the group channel.

- (void)channel:(SBDGroupChannel *_Nonnull)sender userDidJoin:(SBDUser *_Nonnull)user

Parameters

sender

The group channel.

user

The new user joined to the channel.

Declared In

SBDBaseChannel.h

– channel:userDidLeave:

A callback when current member left from the group channel.

- (void)channel:(SBDGroupChannel *_Nonnull)sender userDidLeave:(SBDUser *_Nonnull)user

Parameters

sender

The group channel.

user

The member left from the channel.

Declared In

SBDBaseChannel.h

– channel:userDidEnter:

A callback when a user enter an open channel.

- (void)channel:(SBDOpenChannel *_Nonnull)sender userDidEnter:(SBDUser *_Nonnull)user

Parameters

sender

The open channel.

user

The user

Declared In

SBDBaseChannel.h

– channel:userDidExit:

A callback when a user exit an open channel.

- (void)channel:(SBDOpenChannel *_Nonnull)sender userDidExit:(SBDUser *_Nonnull)user

Parameters

sender

The open channel.

user

The user.

Declared In

SBDBaseChannel.h

– channel:userWasMuted:

A callback when a user was muted in the channel.

- (void)channel:(SBDBaseChannel *_Nonnull)sender userWasMuted:(SBDUser *_Nonnull)user

Parameters

sender

The channel.

user

The user who was muted.

Declared In

SBDBaseChannel.h

– channel:userWasUnmuted:

A callback when a user was unmuted in the channel.

- (void)channel:(SBDBaseChannel *_Nonnull)sender userWasUnmuted:(SBDUser *_Nonnull)user

Parameters

sender

The channel.

user

The user who was unmuted.

Declared In

SBDBaseChannel.h

– channel:userWasBanned:

A callback when a user was banned in the channel.

- (void)channel:(SBDBaseChannel *_Nonnull)sender userWasBanned:(SBDUser *_Nonnull)user

Parameters

sender

The channel.

user

The user who was banned.

Declared In

SBDBaseChannel.h

– channel:userWasUnbanned:

A callback when a user was unbanned in the channel.

- (void)channel:(SBDBaseChannel *_Nonnull)sender userWasUnbanned:(SBDUser *_Nonnull)user

Parameters

sender

The channel.

user

The user who was unbanned.

Declared In

SBDBaseChannel.h

– channelWasFrozen:

A callback when an channel was frozen.

- (void)channelWasFrozen:(SBDBaseChannel *_Nonnull)sender

Parameters

sender

The channel.

Declared In

SBDBaseChannel.h

– channelWasUnfrozen:

A callback when an channel was unfrozen.

- (void)channelWasUnfrozen:(SBDBaseChannel *_Nonnull)sender

Parameters

sender

The channel.

Declared In

SBDBaseChannel.h

– channelWasChanged:

A callback when an open channel was changed.

- (void)channelWasChanged:(SBDBaseChannel *_Nonnull)sender

Parameters

sender

The open channel.

Declared In

SBDBaseChannel.h

– channelWasDeleted:channelType:

A callback when an open channel was deleted.

- (void)channelWasDeleted:(NSString *_Nonnull)channelUrl channelType:(SBDChannelType)channelType

Parameters

channelUrl

The channel url.

channelType

The Type of channel, types of open channel or group channel.

Declared In

SBDBaseChannel.h

– channel:messageWasDeleted:

A callback when a message was removed in the channel.

- (void)channel:(SBDBaseChannel *_Nonnull)sender messageWasDeleted:(long long)messageId

Parameters

sender

The base channel.

messageId

The message ID which was removed.

Declared In

SBDBaseChannel.h

– channel:createdMetaData:

A callback when meta data was created in the channel.

- (void)channel:(SBDBaseChannel *_Nonnull)sender createdMetaData:(NSDictionary<NSString*,NSString*> *_Nullable)createdMetaData

Parameters

sender

The channel that the meta data was created.

createdMetaData

The created meta data.

Declared In

SBDBaseChannel.h

– channel:updatedMetaData:

A callback when meta data was updated in the channel.

- (void)channel:(SBDBaseChannel *_Nonnull)sender updatedMetaData:(NSDictionary<NSString*,NSString*> *_Nullable)updatedMetaData

Parameters

sender

The channel that the meta data was updated.

updatedMetaData

The updated meta data.

Declared In

SBDBaseChannel.h

– channel:deletedMetaDataKeys:

A callback when meta data was deleted in the channel.

- (void)channel:(SBDBaseChannel *_Nonnull)sender deletedMetaDataKeys:(NSArray<NSString*> *_Nullable)deletedMetaDataKeys

Parameters

sender

The channel that the meta data was deleted.

deletedMetaDataKeys

The keys of the deleted meta data.

Declared In

SBDBaseChannel.h

– channel:createdMetaCounters:

A callback when meta counters were created in the channel.

- (void)channel:(SBDBaseChannel *_Nonnull)sender createdMetaCounters:(NSDictionary<NSString*,NSNumber*> *_Nullable)createdMetaCounters

Parameters

sender

The channel that the meta counters were created.

createdMetaCounters

The created meta counters.

Declared In

SBDBaseChannel.h

– channel:updatedMetaCounters:

A callback when meta counters were updated in the channel.

- (void)channel:(SBDBaseChannel *_Nonnull)sender updatedMetaCounters:(NSDictionary<NSString*,NSNumber*> *_Nullable)updatedMetaCounters

Parameters

sender

The channel that the meta counters were updated.

updatedMetaCounters

The updated meta counters.

Declared In

SBDBaseChannel.h

– channel:deletedMetaCountersKeys:

A callback when meta counters were deleted in the channel.

- (void)channel:(SBDBaseChannel *_Nonnull)sender deletedMetaCountersKeys:(NSArray<NSString*> *_Nullable)deletedMetaCountersKeys

Parameters

sender

The channel that the meta counters were deleted.

deletedMetaCountersKeys

The keys of the deleted meta counters.

Declared In

SBDBaseChannel.h

– channelWasHidden:

A callback when the channel was hidden on the other device or by Platform API.

- (void)channelWasHidden:(SBDGroupChannel *_Nonnull)sender

Parameters

sender

The channel that was hidden on the other device or by Platform API.

Declared In

SBDBaseChannel.h