mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-02-02 07:31:38 +01:00
dont need extra log depth
This commit is contained in:
parent
f46d2c1bf5
commit
1f8a591cf6
@ -200,7 +200,6 @@ export class Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async _createSessionAfterAuth({deviceId, userId, accessToken, homeserver}, inspectAccountSetup, log) {
|
async _createSessionAfterAuth({deviceId, userId, accessToken, homeserver}, inspectAccountSetup, log) {
|
||||||
await log.wrap("_createSessionAfterAuth", async (l) => {
|
|
||||||
const id = this.createNewSessionId();
|
const id = this.createNewSessionId();
|
||||||
const lastUsed = this._platform.clock.now();
|
const lastUsed = this._platform.clock.now();
|
||||||
const sessionInfo = {
|
const sessionInfo = {
|
||||||
@ -214,7 +213,7 @@ export class Client {
|
|||||||
};
|
};
|
||||||
let dehydratedDevice;
|
let dehydratedDevice;
|
||||||
if (inspectAccountSetup) {
|
if (inspectAccountSetup) {
|
||||||
dehydratedDevice = await this._inspectAccountAfterLogin(sessionInfo, l);
|
dehydratedDevice = await this._inspectAccountAfterLogin(sessionInfo, log);
|
||||||
if (dehydratedDevice) {
|
if (dehydratedDevice) {
|
||||||
sessionInfo.deviceId = dehydratedDevice.deviceId;
|
sessionInfo.deviceId = dehydratedDevice.deviceId;
|
||||||
}
|
}
|
||||||
@ -224,16 +223,15 @@ export class Client {
|
|||||||
// LoadStatus.Error in case of an error,
|
// LoadStatus.Error in case of an error,
|
||||||
// so separate try/catch
|
// so separate try/catch
|
||||||
try {
|
try {
|
||||||
await this._loadSessionInfo(sessionInfo, dehydratedDevice, l);
|
await this._loadSessionInfo(sessionInfo, dehydratedDevice, log);
|
||||||
l.set("status", this._status.get());
|
log.set("status", this._status.get());
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
l.catch(err);
|
log.catch(err);
|
||||||
// free olm Account that might be contained
|
// free olm Account that might be contained
|
||||||
dehydratedDevice?.dispose();
|
dehydratedDevice?.dispose();
|
||||||
this._error = err;
|
this._error = err;
|
||||||
this._status.set(LoadStatus.Error);
|
this._status.set(LoadStatus.Error);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async _loadSessionInfo(sessionInfo, dehydratedDevice, log) {
|
async _loadSessionInfo(sessionInfo, dehydratedDevice, log) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user