웹소켓 도배 방지를 JSON 해석 전으로: 채팅·게임 한도를 합친 원시 한도(초당 70, 최대 240)를 파싱 전에 먼저 적용해 도배가 메시지마다 파싱 비용을 쓰지 않게(gateway.test.ts). 문서에서 지운 lastChatAt 설명 제거

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-14 09:04:07 +09:00
parent 4d1deb8346
commit 0bff06fa3e
5 changed files with 58 additions and 8 deletions

View File

@@ -86,7 +86,7 @@
interface LiarState {
options; players: { id; left }[]; topic; word; liar; liarWord /* 바보 모드 */; order /* 1바퀴 순서 */;
phase: reveal{ready} | describe{round, turn} | discussion{ready} | vote{round 1|2, candidates, votes} | guess | ended;
descriptions: { n, round, from, text | null }[]; chat: { n, from, text, at }[]; lastChatAt;
descriptions: { n, round, from, text | null }[]; chat: { n, from, text, at }[];
events: PublicEvent[]; accused; guess; seq; final: LiarFinal | null;
}
```

View File

@@ -165,7 +165,6 @@ interface MafiaState {
lastHealTarget: PlayerId | null;
privateResults: { to: PlayerId; day: number; text: string }[]; // 경찰/영매 결과
chat: ChatMessage[]; // 서버 상태에 전부 저장, view에서 필터
lastChatAt: Record<PlayerId, number>; // 레이트 리밋
history: PublicEvent[]; // 공개 발표 기록
winner: null | 'town' | 'mafia';
}