customer-android-kotlin

//core/com.kustomer.core.listeners/KusChatListener/onChatMessageReceived

onChatMessageReceived

[androidJvm]
abstract fun onChatMessageReceived(conversationId: String, chatMessage: KusChatMessage)

Called when a chat message has been received from both the agent or the customer itself Check the KusChatMessage.direction property to see if the message was sent by agent or by the customer If the message is sent by agent, check the KusChatMessage.sentByUser information to get the agent information i.e Agent’s name and icon

Note: This method is called even when the chat message was sent by the current user itself

See also

androidJvm

   
com.kustomer.core.models.chat.KusChatMessage  

Parameters

androidJvm

   
conversationId The ID of the conversation for which the message is received
chatMessage The received chat message object