ChatDelegate
public protocol ChatDelegate : AnyObject
Delegate to receive new chat messages
-
Called when a new chat message is received
Declaration
Swift
func chat(_ chat: Chat, didReceiveMessage message: ChatMessage)
Parameters
chat
chat which receives the message
message
The message
-
Called when a message status changes like displayed or received
Declaration
Swift
func chat(_ chat: Chat, didReceiveMessageStatusUpdate message: ChatStatusMessage)
Parameters
chat
Chat which receives the message
message
Message with new status identified by the same id that the original message
-
Called when a participant starts a new action like typing or active
Declaration
Swift
func chat(_ chat: Chat, didReceiveParticipantAction: ChatMessage.ParticipantAction, from participant: ChatParticipant)
Parameters
chat
Chat which receives the message
didReceiveParticipantAction
Participant action
participant
Participant who starts the action
-
Called when last message is updated
Declaration
Swift
func chat(_ chat: Chat, didUpdateLastMessage: ChatMessage)
Parameters
chat
Chat which updates the last message
didUpdateLastMessage
Last message updated
-
Called when unred messages count is updated
Declaration
Swift
func chat(_ chat: Chat, didUpdateUnreadMessagesCount: ChatMessage)
Parameters
chat
Chat which updates the unread messages count
didUpdateUnreadMessagesCount
New unread messages count