don't use trusted web instance for iOS
as it only intercepts the default app.element.io
This commit is contained in:
parent
163f405ae5
commit
260d2b61cd
1 changed files with 5 additions and 2 deletions
|
@ -62,9 +62,12 @@ export class Element {
|
||||||
fragmentPath = `room/${link.identifier}/${link.eventId}`;
|
fragmentPath = `room/${link.identifier}/${link.eventId}`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (platform === Platform.DesktopWeb || platform === Platform.MobileWeb || platform === Platform.iOS) {
|
const isWebPlatform = platform === Platform.DesktopWeb || platform === Platform.MobileWeb;
|
||||||
|
if (isWebPlatform || platform === Platform.iOS) {
|
||||||
let instanceHost = trustedWebInstances[0];
|
let instanceHost = trustedWebInstances[0];
|
||||||
if (trustedWebInstances.includes(link.webInstances[this.id])) {
|
// we use app.element.io which iOS will intercept, but it likely won't intercept any other trusted instances
|
||||||
|
// so only use a preferred web instance for true web links.
|
||||||
|
if (isWebPlatform && trustedWebInstances.includes(link.webInstances[this.id])) {
|
||||||
instanceHost = link.webInstances[this.id];
|
instanceHost = link.webInstances[this.id];
|
||||||
}
|
}
|
||||||
return `https://${instanceHost}/#/${fragmentPath}`;
|
return `https://${instanceHost}/#/${fragmentPath}`;
|
||||||
|
|
Loading…
Reference in a new issue