From 1dd3e70061aac9537683a7b285dd26bb69f27b80 Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Mon, 24 Jul 2023 17:06:09 -0400 Subject: [PATCH 1/2] Make the copy link buttons prefer aliases to room IDs --- src/room/GroupCallView.tsx | 1 + src/room/InCallView.tsx | 7 ++++++- src/room/InviteModal.tsx | 6 +++--- src/room/LobbyView.tsx | 4 +++- src/room/VideoPreview.tsx | 1 + 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/room/GroupCallView.tsx b/src/room/GroupCallView.tsx index 89a72002..bd222c93 100644 --- a/src/room/GroupCallView.tsx +++ b/src/room/GroupCallView.tsx @@ -86,6 +86,7 @@ export function GroupCallView({ avatarUrl: avatarUrl!, roomId: groupCall.room.roomId, roomName: groupCall.room.name, + roomAlias: groupCall.room.getCanonicalAlias(), }; }, [displayName, avatarUrl, groupCall]); diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index c45edbc2..58812bdf 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -439,7 +439,12 @@ export function InCallView({ /> )} {inviteModalState.isOpen && ( - + )} ); diff --git a/src/room/InviteModal.tsx b/src/room/InviteModal.tsx index ce17ac18..fa9dcd39 100644 --- a/src/room/InviteModal.tsx +++ b/src/room/InviteModal.tsx @@ -23,10 +23,10 @@ import { getRoomUrl } from "../matrix-utils"; import styles from "./InviteModal.module.css"; interface Props extends Omit { - roomId: string; + roomAlias: string; } -export const InviteModal: FC = ({ roomId, ...rest }) => { +export const InviteModal: FC = ({ roomAlias, ...rest }) => { const { t } = useTranslation(); return ( @@ -40,7 +40,7 @@ export const InviteModal: FC = ({ roomId, ...rest }) => {

{t("Copy and share this call link")}

diff --git a/src/room/LobbyView.tsx b/src/room/LobbyView.tsx index 6b51542a..eb725295 100644 --- a/src/room/LobbyView.tsx +++ b/src/room/LobbyView.tsx @@ -83,7 +83,9 @@ export function LobbyView(props: Props) { Or Date: Wed, 26 Jul 2023 10:52:07 -0400 Subject: [PATCH 2/2] Use the more correct name 'roomIdOrAlias' --- src/room/InCallView.tsx | 2 +- src/room/InviteModal.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index ef0b8c47..6ee91607 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -468,7 +468,7 @@ export function InCallView({ )} {inviteModalState.isOpen && ( { - roomAlias: string; + roomIdOrAlias: string; } -export const InviteModal: FC = ({ roomAlias, ...rest }) => { +export const InviteModal: FC = ({ roomIdOrAlias, ...rest }) => { const { t } = useTranslation(); return ( @@ -40,7 +40,7 @@ export const InviteModal: FC = ({ roomAlias, ...rest }) => {

{t("Copy and share this call link")}