Make "share this room" use aliases if possible
Signed-off-by: Aaron Raimist <aaron@raim.ist>
This commit is contained in:
parent
53ebf3b8e3
commit
ccdd2311f4
1 changed files with 3 additions and 3 deletions
|
@ -293,16 +293,16 @@ export function makeRoomPermalink(roomId: string): string {
|
||||||
|
|
||||||
// If the roomId isn't actually a room ID, don't try to list the servers.
|
// If the roomId isn't actually a room ID, don't try to list the servers.
|
||||||
// Aliases are already routable, and don't need extra information.
|
// Aliases are already routable, and don't need extra information.
|
||||||
if (roomId[0] !== '!') return getPermalinkConstructor().forRoom(roomId, []);
|
if (roomId[0] !== '!') return getPermalinkConstructor().forShareableRoom(roomId, []);
|
||||||
|
|
||||||
const client = MatrixClientPeg.get();
|
const client = MatrixClientPeg.get();
|
||||||
const room = client.getRoom(roomId);
|
const room = client.getRoom(roomId);
|
||||||
if (!room) {
|
if (!room) {
|
||||||
return getPermalinkConstructor().forRoom(roomId, []);
|
return getPermalinkConstructor().forShareableRoom(roomId, []);
|
||||||
}
|
}
|
||||||
const permalinkCreator = new RoomPermalinkCreator(room);
|
const permalinkCreator = new RoomPermalinkCreator(room);
|
||||||
permalinkCreator.load();
|
permalinkCreator.load();
|
||||||
return permalinkCreator.forRoom();
|
return permalinkCreator.forShareableRoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function makeGroupPermalink(groupId: string): string {
|
export function makeGroupPermalink(groupId: string): string {
|
||||||
|
|
Loading…
Reference in a new issue