Prefer matrix.to alias links over room id in spaces & share

This commit is contained in:
Michael Telatynski 2021-09-06 11:27:15 +01:00
parent e7cfa4816e
commit e252c5553e
2 changed files with 2 additions and 2 deletions

View file

@ -158,7 +158,7 @@ export default class ShareDialog extends React.PureComponent<IProps, IState> {
if (this.state.linkSpecificEvent) { if (this.state.linkSpecificEvent) {
matrixToUrl = this.props.permalinkCreator.forEvent(this.props.target.getId()); matrixToUrl = this.props.permalinkCreator.forEvent(this.props.target.getId());
} else { } else {
matrixToUrl = this.props.permalinkCreator.forRoom(); matrixToUrl = this.props.permalinkCreator.forShareableRoom();
} }
} }
return matrixToUrl; return matrixToUrl;

View file

@ -39,7 +39,7 @@ const SpacePublicShare = ({ space, onFinished }: IProps) => {
onClick={async () => { onClick={async () => {
const permalinkCreator = new RoomPermalinkCreator(space); const permalinkCreator = new RoomPermalinkCreator(space);
permalinkCreator.load(); permalinkCreator.load();
const success = await copyPlaintext(permalinkCreator.forRoom()); const success = await copyPlaintext(permalinkCreator.forShareableRoom());
const text = success ? _t("Copied!") : _t("Failed to copy"); const text = success ? _t("Copied!") : _t("Failed to copy");
setCopiedText(text); setCopiedText(text);
await sleep(5000); await sleep(5000);