Fix call permissions check confusion around element call (#30521)

It would previously say no permission if you had no perms for an EC call but had perms for a legacy call.

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2025-08-11 16:20:35 +01:00
committed by GitHub
parent 001ed616f6
commit 01c4ba8893

View File

@@ -213,11 +213,12 @@ export const useRoomCall = (
return State.NoOneHere;
}
if (!mayCreateElementCalls && !mayEditWidgets) {
if (!callOptions.includes(PlatformCallType.LegacyCall) && !mayCreateElementCalls && !mayEditWidgets) {
return State.NoPermission;
}
return State.NoCall;
}, [
callOptions,
connectedCalls,
canInviteGuests,
hasGroupCall,