Refactor useIsRoomE2EE

Make it take a room object rather than a room ID to avoid it depending
on a side effect, ie. if the room object input changes, the hook will be
re-run but if we can't get the room from the room ID for whatever reason,
we'd be stuck.

Also add logging on why we decided a room was e2ee.
This commit is contained in:
David Baker
2023-09-22 15:35:03 +01:00
parent e9e37736b0
commit 3cd0ca205b
4 changed files with 23 additions and 14 deletions

View File

@@ -110,7 +110,7 @@ export const RoomPage: FC = () => {
{content}
{/* On Android and iOS, show a prompt to launch the mobile app. */}
{appPrompt && (platform === "android" || platform === "ios") && (
<AppSelectionModal roomId={roomId} />
<AppSelectionModal roomId={roomId ?? undefined} />
)}
</>
);