Merge pull request #271 from deepbluev7/fix-element-deeplinks

Properly pass vias to Element clients
This commit is contained in:
Michael Telatynski 2022-06-06 17:07:39 +01:00 committed by GitHub
commit d7c108588e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,6 +64,11 @@ export class Element {
fragmentPath = `room/${link.identifier}/${link.eventId}`;
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;
if (isWebPlatform || platform === Platform.iOS) {
let instanceHost = trustedWebInstances[0];