mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
create e2ee identity also when storage got cleared without backup
This commit is contained in:
parent
a1c66738db
commit
e0b9a3fa50
@ -237,6 +237,10 @@ export class Session {
|
|||||||
return this._sessionBackup;
|
return this._sessionBackup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get hasIdentity() {
|
||||||
|
return !!this._e2eeAccount;
|
||||||
|
}
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
async createIdentity(log) {
|
async createIdentity(log) {
|
||||||
if (this._olm) {
|
if (this._olm) {
|
||||||
|
@ -233,8 +233,7 @@ export class SessionContainer {
|
|||||||
platform: this._platform,
|
platform: this._platform,
|
||||||
});
|
});
|
||||||
await this._session.load(log);
|
await this._session.load(log);
|
||||||
// TODO: check instead storage doesn't have an identity
|
if (!this._session.hasIdentity) {
|
||||||
if (isNewLogin) {
|
|
||||||
this._status.set(LoadStatus.SessionSetup);
|
this._status.set(LoadStatus.SessionSetup);
|
||||||
await log.wrap("createIdentity", log => this._session.createIdentity(log));
|
await log.wrap("createIdentity", log => this._session.createIdentity(log));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user