채팅 연속 입력 전부 전송(짧은 연타 허용 + 보내기 대기열), 사람도 '입력 중' 표시, 오른쪽 위 소리 크기(0~100, 기본 50)
- 서버 방 채팅: 0.5초 고정 간격 대신 토큰 버킷(4줄 연속, 초당 2줄) — 도배는 여전히 막음 - 웹: useChatOutbox(방 채팅·마피아·라이어 게임)로 빠르게 친 줄도 순서대로 전송 - typing 메시지(방 채팅 / 게임 공개 채팅만, 마피아 밤 채널은 보내지 않음), BotActivity에 사람 표시 - VolumeControl: 사이트 머리글·방 막대 오른쪽 위, 설정 페이지에도 슬라이더 - e2e/chat.e2e.ts: 연타 7줄, 입력 중, 소리 크기 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,7 @@ export const ClientMessage = z.discriminatedUnion('t', [
|
||||
z.object({ t: z.literal('act'), cs: z.number().int().min(1), a: z.unknown() }),
|
||||
z.object({ t: z.literal('chat'), text: z.string().min(1).max(CHAT_MAX) }),
|
||||
z.object({ t: z.literal('emote'), id: z.string().max(20) }),
|
||||
z.object({ t: z.literal('typing'), on: z.boolean(), ch: z.enum(['room', 'game']).default('room') }),
|
||||
z.object({ t: z.literal('rematch') }),
|
||||
z.object({ t: z.literal('void') }),
|
||||
z.object({ t: z.literal('sync') }),
|
||||
|
||||
@@ -96,6 +96,8 @@ export type ServerMessage =
|
||||
| { t: 'reject'; cs: number; reason: string }
|
||||
| { t: 'chat'; from: PublicUser | null; text: string; at: number; channel?: string }
|
||||
| { t: 'emote'; from: string; id: string }
|
||||
/** Someone is typing (room chat, or the game's public chat when the game has its own). Expires on its own after a few seconds. */
|
||||
| { t: 'typing'; from: string; on: boolean; ch: 'room' | 'game' }
|
||||
| { t: 'result'; seq: number; result: GameResultView }
|
||||
| { t: 'notice'; code: string; message: string }
|
||||
| { t: 'error'; code: string; message: string }
|
||||
|
||||
Reference in New Issue
Block a user