# ChatManager

class ChatManager

Manager class for global management of the chat service The `ChatManager` class is responsible for overseeing the chat service, managing connection

- states, and interacting with chat sessions. It provides mechanisms to observe and react to

- changes in the connection state and chat interactions.

## Properties

state
Link copied to clipboard
val state: Observable<XmppClient.State>

An observable stream representing the current state of the XMPP client.

## Functions

connect
Link copied to clipboard
fun connect(isDebugEnabled: Boolean = false): Completable

Initiates a connection to the chat service.

disconnect
Link copied to clipboard
fun disconnect(): Completable

Disconnect the chat service connection.

getChat
Link copied to clipboard
fun getChat(xmppJid: XmppJid, forceUpdate: Boolean): Maybe<Chat>

Retrieves a list of messages from all active chats.

getChats
Link copied to clipboard
fun getChats(): Single<List<Chat>>

Retrieves a list of all active chat instances.

getMessagesFromAllChats
Link copied to clipboard
fun getMessagesFromAllChats(): Single<List<Chat>>

Retrieves a list of messages from all active chats.

restore
Link copied to clipboard
fun restore(isDebugEnabled: Boolean = false): Completable

Restores the chat service connection from a previous state.

suspend
Link copied to clipboard
fun suspend(): Completable

Suspends the chat service connection from the previous state.