A seat's address is noted at most once in ten minutes, so a seat open on two networks writes no line per request

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CCLa2PaEeCj8njQZSWGqHx
This commit is contained in:
Eric WagonerandClaude Fable 5.1 committed 2026-11-10 21:32:31 -05:00
1 parent 66a274c5d4
commit 81eba3e7a6
2 files changed
+13 -2

No files matched your search

+2
View File
@@ -273,6 +273,8 @@ describe('a seat a browser lost', () => {
expect(room.seats.find((s) => s.id === 'B')?.addr).toBe('home');
expect(room.seq).toBe(seq);
rooms.seen(room, 'no-such-token', 'elsewhere');
// A seat open on two networks at once: the second address is not written on its heels.
rooms.seen(room, bo, 'office');
expect(new Store(dir).read(room.id).filter((l) => l.t === 'seen')).toHaveLength(1);
expect(new Rooms(game, new Store(dir)).get(room.id).seats.find((s) => s.id === 'B')?.addr).toBe('home');
});