대기실 보완: 만들고 아무도 안 들어간 방도 5분 뒤 정리, 거절된 채팅(도배 방지·빈 메시지)은 nonce를 담아 알려서 "보내는 중" 줄을 지우고 안내
- 회귀 테스트: 서버 2개(수정 전 코드에서 실패 확인), e2e 1단계 추가 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -120,7 +120,11 @@ function onMessage(m: ServerMessage): void {
|
||||
return;
|
||||
case 'error': {
|
||||
const st = useRoom.getState();
|
||||
if (joining && st.code) {
|
||||
if (m.n) {
|
||||
// A refused chat line: drop its "보내는 중" copy and say why.
|
||||
useRoom.setState({ pending: st.pending.filter((p) => p.n !== m.n) });
|
||||
toast(m.message, 'error');
|
||||
} else if (joining && st.code) {
|
||||
joining = false;
|
||||
// The room was there a moment ago (this tab was in it): the server restarted and rooms live in memory (docs/04 결정 1).
|
||||
// Kept after that, so a refresh still explains it.
|
||||
|
||||
Reference in New Issue
Block a user