Merge pull request #1951 from vector-im/dbkr/dont_redirect_email_verify
Don't redirect to mobile app if verifying 3pidpull/1959/head
commit
bb1854814c
|
@ -184,6 +184,14 @@ function onLoadCompleted() {
|
||||||
|
|
||||||
|
|
||||||
async function loadApp() {
|
async function loadApp() {
|
||||||
|
const fragparts = parseQsFromFragment(window.location);
|
||||||
|
const params = parseQs(window.location);
|
||||||
|
|
||||||
|
// don't try to redirect to the native apps if we're
|
||||||
|
// verifying a 3pid
|
||||||
|
const preventRedirect = Boolean(fragparts.params.client_secret);
|
||||||
|
|
||||||
|
if (!preventRedirect) {
|
||||||
if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {
|
if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {
|
||||||
if (confirm("Vector is not supported on mobile web. Install the app?")) {
|
if (confirm("Vector is not supported on mobile web. Install the app?")) {
|
||||||
window.location = "https://itunes.apple.com/us/app/vector.im/id1083446067";
|
window.location = "https://itunes.apple.com/us/app/vector.im/id1083446067";
|
||||||
|
@ -196,6 +204,7 @@ async function loadApp() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let configJson;
|
let configJson;
|
||||||
let configError;
|
let configError;
|
||||||
|
@ -219,9 +228,6 @@ async function loadApp() {
|
||||||
} else if (validBrowser) {
|
} else if (validBrowser) {
|
||||||
var MatrixChat = sdk.getComponent('structures.MatrixChat');
|
var MatrixChat = sdk.getComponent('structures.MatrixChat');
|
||||||
|
|
||||||
var fragparts = parseQsFromFragment(window.location);
|
|
||||||
var params = parseQs(window.location);
|
|
||||||
|
|
||||||
window.matrixChat = ReactDOM.render(
|
window.matrixChat = ReactDOM.render(
|
||||||
<MatrixChat
|
<MatrixChat
|
||||||
onNewScreen={onNewScreen}
|
onNewScreen={onNewScreen}
|
||||||
|
|
Loading…
Reference in New Issue