diff --git a/src/components/views/dialogs/ShareDialog.tsx b/src/components/views/dialogs/ShareDialog.tsx index 85e9c6f192..80c0543c4e 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 cb282d8d1f..f8860ddd54 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);