@ably/chat - v1.3.1
    Preparing search index...

    Interface UsePresenceListenerParams

    The options for the usePresenceListener hook.

    interface UsePresenceListenerParams {
        listener?: PresenceListener;
        onConnectionStatusChange?: (change: ConnectionStatusChange) => void;
        onDiscontinuity?: DiscontinuityListener;
        onRoomStatusChange?: (change: RoomStatusChange) => void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    listener?: PresenceListener

    The listener to be called when the presence state changes. The listener is removed when the component unmounts.

    usePresenceListener({
    listener: (presenceEvent) => {
    console.log('Presence event:', presenceEvent.type, presenceEvent.member.clientId);
    }
    });
    onConnectionStatusChange?: (change: ConnectionStatusChange) => void

    Register a callback for when the connection status to Ably changes.

    Type Declaration

    onDiscontinuity?: DiscontinuityListener

    Register a callback to detect and respond to discontinuities. For example, you might choose to fetch missing messages.

    The error that caused the discontinuity.

    onRoomStatusChange?: (change: RoomStatusChange) => void

    Register a callback for when the room status changes.

    Type Declaration