Table talk keeps its place in the chronicle
Live chat interleaved correctly, but a reload sank every past message to the bottom: the rejoin sent the whole game history first and the chat history after. Talk is now a tableTalk event in the room's event stream at the moment it was said — the room file already preserved the interleaving, since chat lines append between command lines — so rejoining players read the banter between the battle lines where it happened. The separate chatHistory message retires; unread counting rides the event stream instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
ef661c79ad
commit
5802e1df05
@@ -19,7 +19,6 @@
|
||||
// {type:"events", events} redacted for this recipient
|
||||
// {type:"state", view, seq} redacted full view (after every change)
|
||||
// {type:"chat", player, text, at} one line of table talk
|
||||
// {type:"chatHistory", messages} the room's talk so far, on join
|
||||
// {type:"transferCode"|"transferClaimed"|"catchUp"|"games"|"stats"}
|
||||
// {type:"error", message}
|
||||
|
||||
@@ -250,9 +249,6 @@ wss.on("connection", (socket) => {
|
||||
if (room.state) {
|
||||
send(socket, { type: "events", events: redactFor(room.events, name) });
|
||||
}
|
||||
if (room.chat.length > 0) {
|
||||
send(socket, { type: "chatHistory", messages: room.chat.slice(-100) });
|
||||
}
|
||||
broadcastRoomState(room);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user