ChatUtils

Implements IChatControl

constructor();
ChatInstanceFactory: any
ChatInstanceCallbacks: any
_chats: any
initializeCleanup: any
getChatInstance: any

Gets or creates a chat instance for a client

beginChat: (clientId: string, swarmName: string) => Promise<void>

Begins a chat session for a client

sendMessage: (clientId: string, message: string, swarmName: string) => Promise<string>

Sends a message for a client

listenDispose: (clientId: string, swarmName: string, fn: (clientId: string) => void) => void

Listens for dispose events for a client

dispose: (clientId: string, swarmName: string) => Promise<void>

Disposes of a chat instance

useChatAdapter(Ctor: TChatInstanceCtor): void;

Sets the chat instance constructor

useChatCallbacks(Callbacks: Partial<IChatInstanceCallbacks>): void;

Sets chat instance callbacks