Prevent ElementX from intercepting links that it can't handle. Redirect them to the system browser

This commit is contained in:
Stefan Ceriu
2023-09-26 13:38:25 +03:00
committed by Stefan Ceriu
parent a05c3e3774
commit 68ea9acb36
2 changed files with 12 additions and 1 deletions
@@ -83,6 +83,12 @@ struct ElementCallURLParser: URLParser {
private let customSchemeURLQueryParameterName = "url"
func route(from url: URL) -> AppRoute? {
// Element Call not supported, WebRTC not available
// https://github.com/vector-im/element-x-ios/issues/1794
if ProcessInfo.processInfo.isiOSAppOnMac {
return nil
}
// First try processing URLs with custom schemes
if let scheme = url.scheme,
scheme == InfoPlistReader.app.elementCallScheme {