Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Events

Events

Properties

Readonly created_at

created_at: string

When chat room was created.

Readonly creator

creator: string

Creator's id.

history

history: History

History of messages.

Readonly id

id: string

Persistent unique id.

members

members: string[]

List of room's all active members.

name

name: string

Chat room's name.

updated_at

updated_at: string

When chat room was last updated (ignoring participants meta updates).

Methods

addMembers

  • addMembers(ids: string[]): Promise<Room>

meta

  • meta(id: string): undefined | { username: string }
  • Get participant's meta by id.

    Parameters

    • id: string

    Returns undefined | { username: string }

off

  • off(): void
  • off<E>(event: E): void
  • off<E>(events: E[]): void
  • off<E>(event: E, listener: EventListener<RoomListeners[E]>): void
  • off<E>(events: E[], listener: EventListener<RoomListeners[E]>): void
  • Removes all listeners.

    Returns void

  • Removes all listeners for event.

    Type parameters

    Parameters

    • event: E

    Returns void

  • Removes all listeners for events.

    Type parameters

    Parameters

    • events: E[]

    Returns void

  • Removes specific listener for event.

    Type parameters

    Parameters

    • event: E
    • listener: EventListener<RoomListeners[E]>

    Returns void

  • Removes specific listener for multiple events.

    Type parameters

    Parameters

    • events: E[]
    • listener: EventListener<RoomListeners[E]>

    Returns void

on

  • on<E>(event: E, listener: EventListener<RoomListeners[E]>): void
  • on<E>(events: E[], listener: EventListener<RoomListeners[E]>): void
  • Adds listener for event.

    Type parameters

    Parameters

    • event: E
    • listener: EventListener<RoomListeners[E]>

    Returns void

  • Adds the same listener for multiple events.

    Type parameters

    Parameters

    • events: E[]
    • listener: EventListener<RoomListeners[E]>

    Returns void

removeMembers

  • removeMembers(ids: string[]): Promise<Room>

rename

  • rename(name: string): Promise<Room>