diff --git a/playwright/e2e/room/room-header.spec.ts b/playwright/e2e/room/room-header.spec.ts index 78e37cd4d2..5f14bfc85f 100644 --- a/playwright/e2e/room/room-header.spec.ts +++ b/playwright/e2e/room/room-header.spec.ts @@ -37,11 +37,8 @@ test.describe("Room Header", () => { await expect(header.locator(".mx_FacePile")).toBeVisible(); // There should be both a voice and a video call button - // but they'll be disabled - const callButtons = header.getByRole("button", { name: "There's no one here to call" }); - await expect(callButtons).toHaveCount(2); - await expect(callButtons.first()).toBeVisible(); - await expect(callButtons.last()).toBeVisible(); + await expect(header.getByRole("button", { name: "Video call" })).toBeVisible(); + await expect(header.getByRole("button", { name: "Voice call" })).toBeVisible(); await expect(header.getByRole("button", { name: "Threads" })).toBeVisible(); await expect(header.getByRole("button", { name: "Notifications" })).toBeVisible(); diff --git a/src/hooks/room/useRoomCall.tsx b/src/hooks/room/useRoomCall.tsx index b8bf925afc..9e450eed0e 100644 --- a/src/hooks/room/useRoomCall.tsx +++ b/src/hooks/room/useRoomCall.tsx @@ -32,7 +32,6 @@ import { type ViewRoomPayload } from "../../dispatcher/payloads/ViewRoomPayload" import { Action } from "../../dispatcher/actions"; import { CallStore, CallStoreEvent } from "../../stores/CallStore"; import { isVideoRoom } from "../../utils/video-rooms"; -import { useGuestAccessInformation } from "./useGuestAccessInformation"; import { UIFeature } from "../../settings/UIFeature"; import { BetaPill } from "../../components/views/beta/BetaCard"; import { type InteractionName } from "../../PosthogTrackers"; @@ -73,7 +72,6 @@ export const getPlatformCallTypeProps = ( const enum State { NoCall, - NoOneHere, NoPermission, Unpinned, Ongoing, @@ -197,7 +195,6 @@ export const useRoomCall = ( const connectedCalls = useEventEmitterState(CallStore.instance, CallStoreEvent.ConnectedCalls, () => Array.from(CallStore.instance.connectedCalls), ); - const { canInviteGuests } = useGuestAccessInformation(room); const state = useMemo((): State => { if (connectedCalls.find((call) => call.roomId != room.roomId)) { @@ -209,9 +206,6 @@ export const useRoomCall = ( if (hasLegacyCall) { return State.Ongoing; } - if (memberCount <= 1 && !canInviteGuests) { - return State.NoOneHere; - } if (!callOptions.includes(PlatformCallType.LegacyCall) && !mayCreateElementCalls && !mayEditWidgets) { return State.NoPermission; @@ -220,14 +214,12 @@ export const useRoomCall = ( }, [ callOptions, connectedCalls, - canInviteGuests, hasGroupCall, hasJitsiWidget, hasLegacyCall, hasManagedHybridWidget, mayCreateElementCalls, mayEditWidgets, - memberCount, promptPinWidget, room.roomId, ]); @@ -266,10 +258,6 @@ export const useRoomCall = ( voiceCallDisabledReason = _t("voip|disabled_ongoing_call"); videoCallDisabledReason = _t("voip|disabled_ongoing_call"); break; - case State.NoOneHere: - voiceCallDisabledReason = _t("voip|disabled_no_one_here"); - videoCallDisabledReason = _t("voip|disabled_no_one_here"); - break; case State.Unpinned: case State.NotJoined: case State.NoCall: diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index fb4a6f4c18..7b27b0bddf 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -3965,7 +3965,6 @@ "dialpad": "Dialpad", "disable_camera": "Turn off camera", "disable_microphone": "Mute microphone", - "disabled_no_one_here": "There's no one here to call", "disabled_no_perms_start_video_call": "You do not have permission to start video calls", "disabled_no_perms_start_voice_call": "You do not have permission to start voice calls", "disabled_ongoing_call": "Ongoing call", diff --git a/test/unit-tests/components/structures/__snapshots__/RoomView-test.tsx.snap b/test/unit-tests/components/structures/__snapshots__/RoomView-test.tsx.snap index 83bc568c70..d34321ba2e 100644 --- a/test/unit-tests/components/structures/__snapshots__/RoomView-test.tsx.snap +++ b/test/unit-tests/components/structures/__snapshots__/RoomView-test.tsx.snap @@ -1449,8 +1449,8 @@ exports[`RoomView should not display the timeline when the room encryption is lo