Created by the WebSocket route for each socket it opens, and kept here until the socket closes. The user fields are read at connect and left undefined for an anonymous socket.
optional
userId: string
optional
username: string
Read again from the database on each chat edit or delete, so a demoted moderator loses the right at once.
optional
avatarMime: string
optional
avatarVersion: number
Set by updateClientAvatar, for the client's avatar URLs.
optional
pongReceived: boolean
Undefined until the first ping, so a new socket isn't closed at once.
optional
chatOpen: boolean
Set by chat_focus: the chatbox is open and the tab visible, so the user
is reading the chat and gets no notification for a mention in it.
optional
typingAt: number
When the last chat_typing true arrived, in ms.