Use room alias in generated permalink for rooms
Signed-off-by: Simon Merrick <s.m3rrick@gmail.com>pull/21833/head
parent
bb1d52919a
commit
e92ac67152
|
@ -130,7 +130,13 @@ export class RoomPermalinkCreator {
|
||||||
}
|
}
|
||||||
|
|
||||||
forRoom() {
|
forRoom() {
|
||||||
return getPermalinkConstructor().forRoom(this._roomId, this._serverCandidates);
|
try {
|
||||||
|
// Prefer to use canonical alias for permalink if possible
|
||||||
|
const alias = this._room.getCanonicalAlias();
|
||||||
|
return getPermalinkConstructor().forRoom(alias, this._serverCandidates);
|
||||||
|
} catch (error) {
|
||||||
|
return getPermalinkConstructor().forRoom(this._roomId, this._serverCandidates);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onRoomState(event) {
|
onRoomState(event) {
|
||||||
|
|
Loading…
Reference in New Issue