Merge pull request #5451 from iokiwi/new/room-alias-in-permalink
Use room alias in generated permalink for rooms
This commit is contained in:
commit
af69ba9c79
3 changed files with 13 additions and 1 deletions
|
@ -129,6 +129,17 @@ export class RoomPermalinkCreator {
|
|||
return getPermalinkConstructor().forEvent(this._roomId, eventId, this._serverCandidates);
|
||||
}
|
||||
|
||||
forShareableRoom() {
|
||||
if (this._room) {
|
||||
// Prefer to use canonical alias for permalink if possible
|
||||
const alias = this._room.getCanonicalAlias();
|
||||
if (alias) {
|
||||
return getPermalinkConstructor().forRoom(alias, this._serverCandidates);
|
||||
}
|
||||
}
|
||||
return getPermalinkConstructor().forRoom(this._roomId, this._serverCandidates);
|
||||
}
|
||||
|
||||
forRoom() {
|
||||
return getPermalinkConstructor().forRoom(this._roomId, this._serverCandidates);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue