diff --git a/packages/server/src/rooms.ts b/packages/server/src/rooms.ts index 651000c..b284009 100644 --- a/packages/server/src/rooms.ts +++ b/packages/server/src/rooms.ts @@ -384,7 +384,10 @@ export interface CatchUpStep { */ export function catchUpSteps(room: Room, playerId: PlayerId, sinceSeq: number, full = false): CatchUpStep[] | { error: string } { if (!room.state) return { error: "game not started" }; - if (!room.players.includes(playerId)) return { error: "you hold no seat in this room" }; + // The SPECTATOR builds whole-game share pages: public knowledge, no seat. + if (playerId !== SPECTATOR && !room.players.includes(playerId)) { + return { error: "you hold no seat in this room" }; + } if (full && room.state.phase !== "finished") return { error: "full replays wait for the game to finish" }; const MAX_STEPS = 200; const from = full ? 0 : Math.max(sinceSeq, room.log.length - MAX_STEPS);