From 466d7ee394fe82ff62ed56eb67c7fb811201d3e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Wed, 9 Aug 2023 13:59:58 +0200 Subject: [PATCH] Don't allow joining existing calls with E2EE enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/home/JoinExistingCallModal.tsx | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/src/home/JoinExistingCallModal.tsx b/src/home/JoinExistingCallModal.tsx index dfa6b095..26b3bf10 100644 --- a/src/home/JoinExistingCallModal.tsx +++ b/src/home/JoinExistingCallModal.tsx @@ -21,6 +21,7 @@ import { Modal, ModalContent } from "../Modal"; import { Button } from "../button"; import { FieldRow } from "../input/Input"; import styles from "./JoinExistingCallModal.module.css"; +import { useEnableE2EE } from "../settings/useSetting"; interface Props { onJoin: (e: PressEvent) => void; @@ -30,21 +31,36 @@ interface Props { } export function JoinExistingCallModal({ onJoin, onClose, ...rest }: Props) { const { t } = useTranslation(); + const [e2eeEnabled] = useEnableE2EE(); return ( -

{t("This call already exists, would you like to join?")}

+

+ {e2eeEnabled + ? t( + "This call already exists, please join using a URL retrieved using the in-app copy link button" + ) + : t("This call already exists, would you like to join?")} +

- - + {e2eeEnabled ? ( + + ) : ( + <> + + + + )}