QNChatDelegate

public protocol QNChatDelegate : AnyObject

Delegate to receive new chat messages

Events

  • Called when a new chat message is received

    Declaration

    Swift

    func didReceiveMessage(_ message: QNChatMessage)

    Parameters

    message

    The message

  • Called when a message status changes like displayed or received

    Declaration

    Swift

    func didReceiveMessageStatusUpdate(_ message: QNChatStatusMessage)

    Parameters

    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 didReceiveParticipantAction(_ action: QNChatMessage.ParticipantAction,
                                     from participant: QNChatParticipant)

    Parameters

    action

    Participant action

    participant

    Participant who starts the action

  • Called when last message is updated

    Declaration

    Swift

    func didUpdateLastMessage(_ message: QNChatMessage)

    Parameters

    message

    Last message updated

  • Called when unred messages count is updated

    Declaration

    Swift

    func didUpdateUnreadMessagesCount(_ unreadMessagesCount: Int)

    Parameters

    unreadMessagesCount

    New unread messages count