KUSChatListener
KUSChatListener Protocol reference for Kustomer Chat iOS Core API .
Subscribe to this to receive chat events. See Build your own UI for a guide to how to use KUSChatListener.
public protocol KUSChatListener
onChatMessageReceived(conversationId:chatMessage:)
When a new chat message is received. Order not guaranteed. In your UI, sort by createdAt to recover the correct message order.
func onChatMessageReceived(conversationId: String, chatMessage: KUSChatMessage)
onConversationCreated(conversationId:conversation:)
When a new conversation is created and successfully sent to the Kustomer servers
func onConversationCreated(conversationId: String, conversation: KUSConversation)
onConversationEnded(conversationId:conversation:)
When a conversation ends
func onConversationEnded(conversationId: String, conversation: KUSConversation)
onOpenConversationCountChange(count:)
When the open conversation count changes
func onOpenConversationCountChange(count: Int)
onUnreadCountChange(count:)
When the unread count changes
func onUnreadCountChange(count: Int)
onUserIsTyping(conversationId:user:timetoken:)
When a KUSUser
starts typing. Only fires if the conversation detail screen for this conversationId
is open in the UI.
func onUserIsTyping(conversationId: String, user: KUSUser, timetoken: KUSPNTtoken?)
onUserJoined(conversationId:user:)
When a new KUSUser
(customer support agent) joins a conversation.
func onUserJoined(conversationId: String, user: KUSUser)
onUserStopsTyping(conversationId:user:timetoken:)
When a KUSUser
stops typing. Only fires if the conversation detail screen for this conversationId
is open in the UI.
func onUserStopsTyping(conversationId: String, user: KUSUser, timetoken: KUSPNTtoken?)
Updated over 1 year ago