You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Localstorage -> LocalStorage
This commit is contained in:
@ -116,7 +116,7 @@ export async function loadSession(opts) {
|
|||||||
* @returns {String} The persisted session's owner, if an owner exists. Null otherwise.
|
* @returns {String} The persisted session's owner, if an owner exists. Null otherwise.
|
||||||
*/
|
*/
|
||||||
export function getStoredSessionOwner() {
|
export function getStoredSessionOwner() {
|
||||||
const {hsUrl, userId, accessToken} = _getLocalstorageSessionVars();
|
const {hsUrl, userId, accessToken} = _getLocalStorageSessionVars();
|
||||||
return hsUrl && userId && accessToken ? userId : null;
|
return hsUrl && userId && accessToken ? userId : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ function _registerAsGuest(hsUrl, isUrl, defaultDeviceDisplayName) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function _getLocalstorageSessionVars() {
|
function _getLocalStorageSessionVars() {
|
||||||
const hsUrl = localStorage.getItem("mx_hs_url");
|
const hsUrl = localStorage.getItem("mx_hs_url");
|
||||||
const isUrl = localStorage.getItem("mx_is_url") || 'https://matrix.org';
|
const isUrl = localStorage.getItem("mx_is_url") || 'https://matrix.org';
|
||||||
const accessToken = localStorage.getItem("mx_access_token");
|
const accessToken = localStorage.getItem("mx_access_token");
|
||||||
@ -250,7 +250,7 @@ async function _restoreFromLocalStorage() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const {hsUrl, isUrl, accessToken, userId, deviceId} = _getLocalstorageSessionVars();
|
const {hsUrl, isUrl, accessToken, userId, deviceId} = _getLocalStorageSessionVars();
|
||||||
|
|
||||||
let isGuest;
|
let isGuest;
|
||||||
if (localStorage.getItem("mx_is_guest") !== null) {
|
if (localStorage.getItem("mx_is_guest") !== null) {
|
||||||
|
Reference in New Issue
Block a user