endChat

open override fun endChat(forceClose: Boolean = false)

Ends the current chat session.

Note: After calling this method, ChatEventListener.onChatStateChanged receives the StateEvent.Ending and subsequently StateEvent.Ended states.

Parameters

forceClose

When true, the chat is terminated immediately without waiting for a graceful server-side disconnect. When false, the SDK performs a graceful shutdown, attempting delivery of pending messages before disconnecting websocket.