From 9846a61bd06bd77bdeda8c02cf5d9ac632ca2ce3 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Tue, 24 Mar 2026 19:27:24 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(frontend)=20update=20useCanMute=20hoo?= =?UTF-8?q?k=20to=20reflect=20room=20muting=20behavior?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow non-privileged users to mute others when the everyone_can_mute configuration is unset or true. This setting is not yet customizable by room owners and will be introduced in a future update. --- .../src/features/rooms/livekit/hooks/useCanMute.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/features/rooms/livekit/hooks/useCanMute.ts b/src/frontend/src/features/rooms/livekit/hooks/useCanMute.ts index 38d8d3bc..91256243 100644 --- a/src/frontend/src/features/rooms/livekit/hooks/useCanMute.ts +++ b/src/frontend/src/features/rooms/livekit/hooks/useCanMute.ts @@ -1,7 +1,13 @@ import { useIsAdminOrOwner } from './useIsAdminOrOwner' import { Participant } from 'livekit-client' +import { useRoomData } from '@/features/rooms/livekit/hooks/useRoomData' export const useCanMute = (participant: Participant) => { + const apiRoomData = useRoomData() const isAdminOrOwner = useIsAdminOrOwner() - return participant.isLocal || isAdminOrOwner + return ( + participant.isLocal || + isAdminOrOwner || + apiRoomData?.configuration?.everyone_can_mute !== false + ) }