Show unencrypted media warnings in widget mode (#1915)
They weren't showing up because the video tiles didn't think that the call was encrypted in the per-participant keys case.
This commit is contained in:
@@ -76,9 +76,6 @@ export const GroupCallView: FC<Props> = ({
|
|||||||
const memberships = useMatrixRTCSessionMemberships(rtcSession);
|
const memberships = useMatrixRTCSessionMemberships(rtcSession);
|
||||||
const isJoined = useMatrixRTCSessionJoinState(rtcSession);
|
const isJoined = useMatrixRTCSessionJoinState(rtcSession);
|
||||||
|
|
||||||
const e2eeSharedKey = useRoomSharedKey(rtcSession.room.roomId);
|
|
||||||
const isRoomE2EE = useIsRoomE2EE(rtcSession.room.roomId);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
window.rtcSession = rtcSession;
|
window.rtcSession = rtcSession;
|
||||||
return () => {
|
return () => {
|
||||||
@@ -89,8 +86,10 @@ export const GroupCallView: FC<Props> = ({
|
|||||||
const { displayName, avatarUrl } = useProfile(client);
|
const { displayName, avatarUrl } = useProfile(client);
|
||||||
const roomName = useRoomName(rtcSession.room);
|
const roomName = useRoomName(rtcSession.room);
|
||||||
const roomAvatar = useRoomAvatar(rtcSession.room);
|
const roomAvatar = useRoomAvatar(rtcSession.room);
|
||||||
const roomEncrypted = useIsRoomE2EE(rtcSession.room.roomId)!;
|
const e2eeSharedKey = useRoomSharedKey(rtcSession.room.roomId);
|
||||||
const { perParticipantE2EE } = useUrlParams();
|
const { perParticipantE2EE } = useUrlParams();
|
||||||
|
const roomEncrypted =
|
||||||
|
useIsRoomE2EE(rtcSession.room.roomId) || perParticipantE2EE;
|
||||||
|
|
||||||
const matrixInfo = useMemo((): MatrixInfo => {
|
const matrixInfo = useMemo((): MatrixInfo => {
|
||||||
return {
|
return {
|
||||||
@@ -289,7 +288,7 @@ export const GroupCallView: FC<Props> = ({
|
|||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
if (isRoomE2EE && !perParticipantE2EE && !e2eeSharedKey) {
|
if (roomEncrypted && !perParticipantE2EE && !e2eeSharedKey) {
|
||||||
return (
|
return (
|
||||||
<ErrorView
|
<ErrorView
|
||||||
error={
|
error={
|
||||||
@@ -299,7 +298,7 @@ export const GroupCallView: FC<Props> = ({
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else if (!isE2EESupported() && isRoomE2EE) {
|
} else if (!isE2EESupported() && roomEncrypted) {
|
||||||
return (
|
return (
|
||||||
<FullScreenView>
|
<FullScreenView>
|
||||||
<Heading>{t("browser_media_e2ee_unsupported_heading")}</Heading>
|
<Heading>{t("browser_media_e2ee_unsupported_heading")}</Heading>
|
||||||
|
|||||||
Reference in New Issue
Block a user