Use room alias in generated permalink for rooms
Signed-off-by: Simon Merrick <s.m3rrick@gmail.com>
This commit is contained in:
parent
bb1d52919a
commit
e92ac67152
1 changed files with 7 additions and 1 deletions
|
@ -130,8 +130,14 @@ export class RoomPermalinkCreator {
|
|||
}
|
||||
|
||||
forRoom() {
|
||||
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) {
|
||||
switch (event.getType()) {
|
||||
|
|
Loading…
Reference in a new issue