delegate to class when needing a roomId permalink
This commit is contained in:
parent
d4c6198fa3
commit
8d929add18
1 changed files with 5 additions and 2 deletions
|
@ -241,8 +241,11 @@ export function makeRoomPermalink(roomId) {
|
|||
// Aliases are already routable, and don't need extra information.
|
||||
if (roomId[0] !== '!') return permalinkBase;
|
||||
|
||||
const serverCandidates = pickServerCandidates(roomId);
|
||||
return `${permalinkBase}${encodeServerCandidates(serverCandidates)}`;
|
||||
const client = MatrixClientPeg.get();
|
||||
const room = client.getRoom(roomId);
|
||||
const permaLinkCreator = new RoomPermaLinkCreator(room);
|
||||
permaLinkCreator.load();
|
||||
return permaLinkCreator.forRoom();
|
||||
}
|
||||
|
||||
export function makeGroupPermalink(groupId) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue