Align widget_build_url_ignore_dm with call behaviour switch between 1:1 and Widget (#12760)

* Align `widget_build_url_ignore_dm` with call behaviour switch between 1:1 and Widget

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Improve coverage

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-07-15 10:08:34 +01:00 committed by GitHub
parent 44454618d8
commit 3221f7cade
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 103 additions and 46 deletions

View file

@ -271,8 +271,7 @@ export const useRoomCall = (
}, [isViewingCall, room.roomId]);
// We hide the voice call button if it'd have the same effect as the video call button
let hideVoiceCallButton =
isManagedHybridWidgetEnabled(room.roomId) || !callOptions.includes(PlatformCallType.LegacyCall);
let hideVoiceCallButton = isManagedHybridWidgetEnabled(room) || !callOptions.includes(PlatformCallType.LegacyCall);
let hideVideoCallButton = false;
// We hide both buttons if they require widgets but widgets are disabled.
if (memberCount > 2 && !SettingsStore.getValue(UIFeature.Widgets)) {