ChatInstance

Implementation of a single chat instance

Constructors

Properties

beginChat: () => Promise<void> & ISingleshotClearable

Begins a chat session

callbacks: Partial<IChatInstanceCallbacks>
clientId: string
onDispose: DisposeFn
payload: Payload
swarmName: string

Methods

  • Checks if the chat has been active within the timeout period

    Parameters

    • now: number

    Returns Promise<boolean>

  • Disposes of the chat instance

    Returns Promise<void>

  • Adds a listener for dispose events

    Parameters

    • fn: (clientId: string) => void

    Returns () => void

  • Sends a message in the chat

    Parameters

    • content: string

    Returns Promise<string>