You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-01 04:43:29 +03:00
Always migrate inbound group sessions
This commit is contained in:
@@ -223,14 +223,8 @@ OlmDevice.prototype._migrateFromSessionStore = async function() {
|
||||
let numIbSessions = 0;
|
||||
await this._cryptoStore.doTxn(
|
||||
'readwrite', [IndexedDBCryptoStore.STORE_INBOUND_GROUP_SESSIONS], (txn) => {
|
||||
this._cryptoStore.countEndToEndInboundGroupSessions(txn, (count) => {
|
||||
if (count) {
|
||||
console.log(
|
||||
"Cryto store already has inbound group sessions: "+
|
||||
"not migrating",
|
||||
);
|
||||
return;
|
||||
}
|
||||
// We always migrate inbound group sessions, even if we already have some
|
||||
// in the new store. They should be be safe to migrate.
|
||||
for (const s of ibGroupSessions) {
|
||||
try {
|
||||
this._cryptoStore.addEndToEndInboundGroupSession(
|
||||
@@ -253,7 +247,6 @@ OlmDevice.prototype._migrateFromSessionStore = async function() {
|
||||
"Migrating " + numIbSessions +
|
||||
" inbound group sessions from session store",
|
||||
);
|
||||
});
|
||||
},
|
||||
);
|
||||
this._sessionStore.removeAllEndToEndInboundGroupSessions();
|
||||
|
||||
Reference in New Issue
Block a user