fix: surface voice channel full errors for join-voice-listen IPC

Return UI error toast instead of ipc dispatch failed when voice
channel is at capacity for listen-only joins.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-23 04:43:08 -04:00
co-authored by Cursor
parent 012f4f656c
commit 3d1d44d0a2
+20 -4
View File
@@ -458,13 +458,29 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
return true
}
if (t === 'join-voice') {
await platform.joinVoiceChannel(msg.channelId)
pushState()
try {
await platform.joinVoiceChannel(msg.channelId)
pushState()
} catch (err) {
if (/voice channel is full/i.test(err?.message || '')) {
send({ type: 'error', message: err.message })
return true
}
throw err
}
return true
}
if (t === 'join-voice-listen') {
await platform.joinVoiceListenOnly(msg.channelId)
pushState()
try {
await platform.joinVoiceListenOnly(msg.channelId)
pushState()
} catch (err) {
if (/voice channel is full/i.test(err?.message || '')) {
send({ type: 'error', message: err.message })
return true
}
throw err
}
return true
}
if (t === 'leave-voice') {