This accessor provides methods for accessing rooms in a read-only-fashion.

Hierarchy

  • IRoomRead

Methods

  • Gets an iterator for all of the users in the provided room.

    Parameters

    • roomId: string

      the room's id

    Returns Promise<IUser[]>

    an iterator for the users in the room

  • Retrieves an array of messages from the specified room.

    Parameters

    • roomId: string

      The unique identifier of the room from which to retrieve messages.

    • Optional options: Partial<GetMessagesOptions>

      Optional parameters for retrieving messages: - limit: The maximum number of messages to retrieve. Maximum 100 - skip: The number of messages to skip (for pagination). - sort: An object defining the sorting order of the messages. Each key is a field to sort by, and the value is either "asc" for ascending order or "desc" for descending order.

    Returns Promise<IMessageRaw[]>

    A Promise that resolves to an array of IMessage objects representing the messages in the room.

  • Get a list of the moderators of a given room

    Parameters

    • roomId: string

      the room's id

    Returns Promise<IUser[]>

    a list of the users with the moderator role in the room

Generated using TypeDoc