mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Merge branch 'master' into vector
This commit is contained in:
commit
50edc619af
@ -78,9 +78,9 @@ module.exports = {
|
|||||||
logged_in: false,
|
logged_in: false,
|
||||||
ready: false
|
ready: false
|
||||||
});
|
});
|
||||||
localStorage.removeItem("mx_hs_url");
|
if (window.localStorage) {
|
||||||
localStorage.removeItem("mx_user_id");
|
window.localStorage.clear();
|
||||||
localStorage.removeItem("mx_access_token");
|
}
|
||||||
Notifier.stop();
|
Notifier.stop();
|
||||||
MatrixClientPeg.get().removeAllListeners();
|
MatrixClientPeg.get().removeAllListeners();
|
||||||
MatrixClientPeg.replace(null);
|
MatrixClientPeg.replace(null);
|
||||||
|
@ -82,10 +82,15 @@ module.exports = {
|
|||||||
}));
|
}));
|
||||||
var localStorage = window.localStorage;
|
var localStorage = window.localStorage;
|
||||||
if (localStorage) {
|
if (localStorage) {
|
||||||
localStorage.setItem("mx_hs_url", that.state.hs_url);
|
try {
|
||||||
localStorage.setItem("mx_is_url", that.state.is_url);
|
localStorage.clear();
|
||||||
localStorage.setItem("mx_user_id", data.user_id);
|
localStorage.setItem("mx_hs_url", that.state.hs_url);
|
||||||
localStorage.setItem("mx_access_token", data.access_token);
|
localStorage.setItem("mx_is_url", that.state.is_url);
|
||||||
|
localStorage.setItem("mx_user_id", data.user_id);
|
||||||
|
localStorage.setItem("mx_access_token", data.access_token);
|
||||||
|
} catch (e) {
|
||||||
|
console.warn("Error using local storage: can't persist session!");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
console.warn("No local storage available: can't persist session!");
|
console.warn("No local storage available: can't persist session!");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user