interface VotesUpdateMessage

Sent by the server after a vote, to every socket, or to the poster's alone for a private dump. WSProvider updates the count, and when voterId is the user, it updates their votes too, so their other tabs follow.

Properties

type: "votes_update"
dumpId: string
voteCount: number
voterId: string
action: "cast" | "remove"

Usage

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