Make the copy link buttons prefer aliases to room IDs

This commit is contained in:
Robin Townsend
2023-07-24 17:06:09 -04:00
parent 9ecb76c6b9
commit 1dd3e70061
5 changed files with 14 additions and 5 deletions

View File

@@ -23,10 +23,10 @@ import { getRoomUrl } from "../matrix-utils";
import styles from "./InviteModal.module.css";
interface Props extends Omit<ModalProps, "title" | "children"> {
roomId: string;
roomAlias: string;
}
export const InviteModal: FC<Props> = ({ roomId, ...rest }) => {
export const InviteModal: FC<Props> = ({ roomAlias, ...rest }) => {
const { t } = useTranslation();
return (
@@ -40,7 +40,7 @@ export const InviteModal: FC<Props> = ({ roomId, ...rest }) => {
<p>{t("Copy and share this call link")}</p>
<CopyButton
className={styles.copyButton}
value={getRoomUrl(roomId)}
value={getRoomUrl(roomAlias)}
data-testid="modal_inviteLink"
/>
</ModalContent>