MessageCollectionDelegate
public protocol MessageCollectionDelegate: AnyObject
Methods that are invoked when the event of the message collection occurs.
Since
3.1.0-
Invoked when the messages are added.
Declaration
Swift
optional func messageCollection( _ collection: MessageCollection, context: MessageContext, channel: GroupChannel, addedMessages: [BaseMessage] )
Parameters
collection
Message collection object.
context
The reason why the messages are added.
channel
The channel that has the messages.
addedMessages
Messages to be added.
-
Invoked when the message are updated.
Declaration
Swift
optional func messageCollection( _ collection: MessageCollection, context: MessageContext, channel: GroupChannel, updatedMessages: [BaseMessage] )
Parameters
collection
Message collection object.
context
The reason why the messages are updated.
channel
The channel that has the messages.
updatedMessages
Messages to be updated.
-
Invoked when the message are deleted.
Declaration
Swift
optional func messageCollection( _ collection: MessageCollection, context: MessageContext, channel: GroupChannel, deletedMessages: [BaseMessage] )
Parameters
collection
Message collection object.
context
The reason why the messages are deleted.
channel
The channel that has the messages.
deletedMessages
Messages to be deleted.
-
Invoked when the channel that has the message collection is changed.
Declaration
Swift
optional func messageCollection( _ collection: MessageCollection, context: MessageContext, updatedChannel: GroupChannel )
Parameters
collection
Message collection object.
context
The reason why the channel are changed.
updatedChannel
The channel that has the message collection has.
-
Invoked when the channel that has the message collection is deleted.
Declaration
Swift
optional func messageCollection( _ collection: MessageCollection, context: MessageContext, deletedChannel channelURL: String )
Parameters
collection
Message collection object.
context
The reason why the channel are deleted.
channelURL
Channel URL that has been deleted.
-
Invoked when the huge gap has been detected.
Declaration
Swift
optional func didDetectHugeGap(_ collection: MessageCollection)
Parameters
collection
Message collection object.