From e252c5553e6f98bd3a48e4a84dc6af8784099ede Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 6 Sep 2021 11:27:15 +0100 Subject: [PATCH] Prefer matrix.to alias links over room id in spaces & share --- src/components/views/dialogs/ShareDialog.tsx | 2 +- src/components/views/spaces/SpacePublicShare.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/dialogs/ShareDialog.tsx b/src/components/views/dialogs/ShareDialog.tsx index 85e9c6f1921..80c0543c4e2 100644 --- a/src/components/views/dialogs/ShareDialog.tsx +++ b/src/components/views/dialogs/ShareDialog.tsx @@ -158,7 +158,7 @@ export default class ShareDialog extends React.PureComponent { if (this.state.linkSpecificEvent) { matrixToUrl = this.props.permalinkCreator.forEvent(this.props.target.getId()); } else { - matrixToUrl = this.props.permalinkCreator.forRoom(); + matrixToUrl = this.props.permalinkCreator.forShareableRoom(); } } return matrixToUrl; diff --git a/src/components/views/spaces/SpacePublicShare.tsx b/src/components/views/spaces/SpacePublicShare.tsx index cb282d8d1f5..f8860ddd54b 100644 --- a/src/components/views/spaces/SpacePublicShare.tsx +++ b/src/components/views/spaces/SpacePublicShare.tsx @@ -39,7 +39,7 @@ const SpacePublicShare = ({ space, onFinished }: IProps) => { onClick={async () => { const permalinkCreator = new RoomPermalinkCreator(space); permalinkCreator.load(); - const success = await copyPlaintext(permalinkCreator.forRoom()); + const success = await copyPlaintext(permalinkCreator.forShareableRoom()); const text = success ? _t("Copied!") : _t("Failed to copy"); setCopiedText(text); await sleep(5000);