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;
|
||||
}
|
||||
|
||||
get hasIdentity() {
|
||||
return !!this._e2eeAccount;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
async createIdentity(log) {
|
||||
if (this._olm) {
|
||||
|
@ -233,8 +233,7 @@ export class SessionContainer {
|
||||
platform: this._platform,
|
||||
});
|
||||
await this._session.load(log);
|
||||
// TODO: check instead storage doesn't have an identity
|
||||
if (isNewLogin) {
|
||||
if (!this._session.hasIdentity) {
|
||||
this._status.set(LoadStatus.SessionSetup);
|
||||
await log.wrap("createIdentity", log => this._session.createIdentity(log));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user