fix: send localized connection failure details

This commit is contained in:
illusia committed 2026-09-13 08:00:07 +08:00
1 parent 7e08ee54a5
commit d13b3207a9
3 files changed
+40 -1

No files matched your search

+10
View File
@@ -1408,6 +1408,16 @@ export function useVoiceWebSocket() {
whisperTargetIds.clear();
whisperActive.value = false;
break;
case "connectionFailed":
state.connected = false;
state.connecting = false;
state.reconnecting = false;
state.reconnectFailed = true;
state.errorCode = typeof msg.code === "string" ? msg.code : "CONNECTION_FAILED";
state.error = connectionFailureMessage(state.errorCode);
whisperTargetIds.clear();
whisperActive.value = false;
break;
case "whisperTargets":
applyWhisperState(msg.targetIds, msg.active);
break;