From 79baaca3bb1e3d2d08c6a8b96fa5d8d951b34b26 Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Thu, 1 Oct 2026 12:24:16 -0400 Subject: [PATCH] fix: apply the Voice mode button's checks when Voice Mode is opened from the URL (#31826) --- src/lib/components/chat/Chat.svelte | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 1f7bd0570d..6ede5f90a4 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -2060,6 +2060,20 @@ ////////////////////////// const openCallOverlay = () => { + if (!($user?.role === 'admin' || ($user?.permissions?.chat?.call ?? true))) { + return; + } + + if (selectedModels.length > 1) { + toast.error($i18n.t('Select only one model to call')); + return; + } + + if ($config.audio.stt.engine === 'web') { + toast.error($i18n.t('Call feature is not supported when using Web STT engine')); + return; + } + setTimeout(() => { showCallOverlay.set(true); showControls.set(true);