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);