@ably/chat - v0.10.0
    Preparing search index...

    Interface Room

    Represents a chat room.

    interface Room {
        get channel(): RealtimeChannel;
        get error(): undefined | ErrorInfo;
        get messages(): Messages;
        get name(): string;
        get occupancy(): Occupancy;
        get presence(): Presence;
        get reactions(): RoomReactions;
        get status(): RoomStatus;
        get typing(): Typing;
        attach(): Promise<void>;
        detach(): Promise<void>;
        onDiscontinuity(handler: DiscontinuityListener): StatusSubscription;
        onStatusChange(listener: RoomStatusListener): StatusSubscription;
        options(): RoomOptions;
    }
    Index

    Accessors

    • get name(): string

      The unique identifier of the room.

      Returns string

      The room name.

    Methods

    • Attaches to the room to receive events in realtime.

      If a room fails to attach, it will enter either the RoomStatus.Suspended or RoomStatus.Failed state.

      If the room enters the failed state, then it will not automatically retry attaching and intervention is required.

      If the room enters the suspended state, then the call to attach will reject with the ErrorInfo that caused the suspension. However, the room will automatically retry attaching after a delay.

      Returns Promise<void>

      A promise that resolves when the room is attached.

    • Detaches from the room to stop receiving events in realtime.

      Returns Promise<void>

      A promise that resolves when the room is detached.