property WSChatContextValue.reconcileChat

Repairs the live buffer after a reconnect. It replaces its messages between from and to with messages, which ChatModal fetched. A message missing from them was deleted while the socket was down. A failed send found among them did reach the server, and leaves the pending list.

Type

(
messages: ChatMessage[],
from: Date,
to: Date
) => void

Usage

import { type WSChatContextValue } from "src/contexts/ws/WSContext.ts";