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

    Interface UseMessagesParams

    Parameters for registering callbacks to receive status changes from different chat features.

    Most hooks provided in this library accept this parameter to allow you to listen to status changes.

    It's an alternative to ChatStatusResponse which provide this information via a callback.

    Changing the value provided for each of the available listeners will cause the previously registered listener instance to stop receiving events. However, all message events will be received by exactly one listener.

    Hierarchy (View Summary)

    Index

    Properties

    listener?: MessageListener

    An optional listener that can be provided to receive new messages in the room. The listener is removed when the component unmounts.

    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

    rawReactionsListener?: MessageRawReactionListener

    An optional listener that can be provided to receive individual reactions to messages in the room. The listener is removed when the component unmounts.

    reactionsListener?: MessageReactionListener

    An optional listener that can be provided to receive reaction summaries to messages in the room. The listener is removed when the component unmounts.