diff options
| author | Adam Malczewski <[email protected]> | 2026-06-25 10:52:13 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-25 10:52:13 +0900 |
| commit | cd7f6cdfbd62bf4cf13c953bdb79d02158b6019e (patch) | |
| tree | 765a10ae2d558083310f91854ee459835315294f /src/adapters/ws/logic.ts | |
| parent | baedda844cbf51f2106833084807a2775d64caa3 (diff) | |
| download | dispatch-web-cd7f6cdfbd62bf4cf13c953bdb79d02158b6019e.tar.gz dispatch-web-cd7f6cdfbd62bf4cf13c953bdb79d02158b6019e.zip | |
feat(core): chunks retry-banner, wire conformance, ws logic, history adapter
- core/chunks: add retry-banner view-model (+test), update reducer/selectors/types
- core/wire: update conformance checks (+test)
- adapters/ws: update reconnect logic (+tests)
- adapters/history: new client-side routing adapter (history + popstate wrapper)
Diffstat (limited to 'src/adapters/ws/logic.ts')
| -rw-r--r-- | src/adapters/ws/logic.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/adapters/ws/logic.ts b/src/adapters/ws/logic.ts index b11c5c4..d1a5b5f 100644 --- a/src/adapters/ws/logic.ts +++ b/src/adapters/ws/logic.ts @@ -115,9 +115,11 @@ export function parseServerMessage(data: string): WsServerMessage | null { } case "conversation.open": { if (typeof parsed.conversationId !== "string") return null; + if (typeof parsed.workspaceId !== "string") return null; const msg: ConversationOpenMessage = { type: "conversation.open", conversationId: parsed.conversationId, + workspaceId: parsed.workspaceId, }; return msg; } @@ -127,10 +129,12 @@ export function parseServerMessage(data: string): WsServerMessage | null { if (parsed.status !== "active" && parsed.status !== "idle" && parsed.status !== "closed") { return null; } + if (typeof parsed.workspaceId !== "string") return null; const msg: ConversationStatusChangedMessage = { type: "conversation.statusChanged", conversationId: parsed.conversationId, status: parsed.status, + workspaceId: parsed.workspaceId, }; return msg; } |
