Capture team chat and expose moderation match archives

This commit is contained in:
2026-10-17 20:11:49 -04:00
parent b678de2f6f
commit 870f13b150
28 changed files with 943 additions and 81 deletions
+32 -1
View File
@@ -51,11 +51,42 @@ describe('game chat', () => {
'1:00 say;123;bad;Player;hello',
'1:00 say;123;0;Player;\x15^7',
'1:00 InitGame: say;123;0;Player;hello',
'1:00 sayteam;123;0;Player;hello'
'1:00 sayteam;123;bad;Player;hello',
'1:00 sayteam;123;0;Player;\x15^7'
])
).toEqual([]);
});
it('keeps team and public chat in order with distinct channels and stable public identities', () => {
const messages = parseGameChat([
'1:00 say;123;0;Player;hello; café',
'1:00 sayteam;123;0;^2Player;\x15hello; café',
'1:01 sayteam;456;1;Teammate;reply'
]);
expect(messages).toEqual([
{ time: '1:00', guid: '123', slot: 0, player: 'Player', message: 'hello; café' },
{
time: '1:00',
guid: '123',
slot: 0,
player: 'Player',
message: 'hello; café',
channel: 'team'
},
{
time: '1:01',
guid: '456',
slot: 1,
player: 'Teammate',
message: 'reply',
channel: 'team'
}
]);
expect(JSON.stringify(messages[0])).toBe(
'{"time":"1:00","guid":"123","slot":0,"player":"Player","message":"hello; café"}'
);
});
it('separates matches even when elapsed time keeps increasing', () => {
const entries = parseGameChatTimeline([
'1200:00 InitGame: \\mapname\\zombie_theater',