Remove extra function
that was now doing exactly the same thing as the one above it.
This commit is contained in:
@@ -60,14 +60,6 @@ export const useRoomSharedKey = (roomId: string): string | null => {
|
|||||||
return useInternalRoomSharedKey(roomId)[0] ?? passwordFormUrl;
|
return useInternalRoomSharedKey(roomId)[0] ?? passwordFormUrl;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const useManageRoomSharedKey = (roomId: string): string | null => {
|
|
||||||
const urlPassword = useKeyFromUrl(roomId);
|
|
||||||
|
|
||||||
const [e2eeSharedKey] = useInternalRoomSharedKey(roomId);
|
|
||||||
|
|
||||||
return e2eeSharedKey ?? urlPassword;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const useIsRoomE2EE = (roomId: string): boolean | null => {
|
export const useIsRoomE2EE = (roomId: string): boolean | null => {
|
||||||
const { client } = useClient();
|
const { client } = useClient();
|
||||||
const room = useMemo(() => client?.getRoom(roomId) ?? null, [roomId, client]);
|
const room = useMemo(() => client?.getRoom(roomId) ?? null, [roomId, client]);
|
||||||
|
|||||||
@@ -39,10 +39,7 @@ import { useMediaDevices, MediaDevices } from "../livekit/MediaDevicesContext";
|
|||||||
import { useMatrixRTCSessionMemberships } from "../useMatrixRTCSessionMemberships";
|
import { useMatrixRTCSessionMemberships } from "../useMatrixRTCSessionMemberships";
|
||||||
import { enterRTCSession, leaveRTCSession } from "../rtcSessionHelpers";
|
import { enterRTCSession, leaveRTCSession } from "../rtcSessionHelpers";
|
||||||
import { useMatrixRTCSessionJoinState } from "../useMatrixRTCSessionJoinState";
|
import { useMatrixRTCSessionJoinState } from "../useMatrixRTCSessionJoinState";
|
||||||
import {
|
import { useIsRoomE2EE, useRoomSharedKey } from "../e2ee/sharedKeyManagement";
|
||||||
useManageRoomSharedKey,
|
|
||||||
useIsRoomE2EE,
|
|
||||||
} from "../e2ee/sharedKeyManagement";
|
|
||||||
import { useEnableE2EE } from "../settings/useSetting";
|
import { useEnableE2EE } from "../settings/useSetting";
|
||||||
import { useRoomAvatar } from "./useRoomAvatar";
|
import { useRoomAvatar } from "./useRoomAvatar";
|
||||||
import { useRoomName } from "./useRoomName";
|
import { useRoomName } from "./useRoomName";
|
||||||
@@ -75,7 +72,7 @@ export function GroupCallView({
|
|||||||
const memberships = useMatrixRTCSessionMemberships(rtcSession);
|
const memberships = useMatrixRTCSessionMemberships(rtcSession);
|
||||||
const isJoined = useMatrixRTCSessionJoinState(rtcSession);
|
const isJoined = useMatrixRTCSessionJoinState(rtcSession);
|
||||||
|
|
||||||
const e2eeSharedKey = useManageRoomSharedKey(rtcSession.room.roomId);
|
const e2eeSharedKey = useRoomSharedKey(rtcSession.room.roomId);
|
||||||
const isRoomE2EE = useIsRoomE2EE(rtcSession.room.roomId);
|
const isRoomE2EE = useIsRoomE2EE(rtcSession.room.roomId);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user