Properly pass vias to Element clients
Should fix joining rooms by roomid via matrix.to. fixes #270 Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>
This commit is contained in:
parent
0a15f14af0
commit
0ca4d66a50
1 changed files with 5 additions and 0 deletions
|
@ -64,6 +64,11 @@ export class Element {
|
||||||
fragmentPath = `room/${link.identifier}/${link.eventId}`;
|
fragmentPath = `room/${link.identifier}/${link.eventId}`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((link.kind === LinkKind.Event || link.kind === LinkKind.Room) && link.servers.length > 0) {
|
||||||
|
fragmentPath += '?' + link.servers.map(server => `via=${encodeURIComponent(server)}`).join('&');
|
||||||
|
}
|
||||||
|
|
||||||
const isWebPlatform = platform === Platform.DesktopWeb || platform === Platform.MobileWeb;
|
const isWebPlatform = platform === Platform.DesktopWeb || platform === Platform.MobileWeb;
|
||||||
if (isWebPlatform || platform === Platform.iOS) {
|
if (isWebPlatform || platform === Platform.iOS) {
|
||||||
let instanceHost = trustedWebInstances[0];
|
let instanceHost = trustedWebInstances[0];
|
||||||
|
|
Loading…
Reference in a new issue