interface WelcomeMessage

Sent by the server to a socket once it opens, just after the PresenceUpdateMessage that announces it. WSProvider replaces its state with this one, dropping its pending votes and likes. After a reconnect, it also bumps connectionEpoch, so that pages refetch what they missed. The per-user fields are empty or zero on an anonymous socket.

Properties

type: "welcome"
myVotes: string[]
optional
chatReadAt: string

Absent on an anonymous socket.

Usage

import { type WelcomeMessage } from "shared/ws.ts";