forked from mystiq/hydrogen-web
some fixes
This commit is contained in:
parent
fcc06b2754
commit
8684d6b5e5
3 changed files with 5 additions and 4 deletions
|
@ -17,7 +17,6 @@ import {LogLevel} from "./LogFilter.js";
|
||||||
|
|
||||||
function noop () {}
|
function noop () {}
|
||||||
|
|
||||||
export const Instance = new NullLogger();
|
|
||||||
|
|
||||||
export class NullLogger {
|
export class NullLogger {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -90,3 +89,5 @@ class NullLogItem {
|
||||||
|
|
||||||
finish() {}
|
finish() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const Instance = new NullLogger();
|
||||||
|
|
|
@ -152,7 +152,7 @@ export class RoomEncryption {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
log.refDetached("check key backup", async log => {
|
log.wrapDetached("check key backup", async log => {
|
||||||
// if the message came from sync, wait 10s to see if the room key arrives late,
|
// if the message came from sync, wait 10s to see if the room key arrives late,
|
||||||
// and only after that proceed to request from backup
|
// and only after that proceed to request from backup
|
||||||
log.set("source", source);
|
log.set("source", source);
|
||||||
|
|
|
@ -126,7 +126,7 @@ export class Room extends EventEmitter {
|
||||||
* Used for decrypting when loading/filling the timeline, and retrying decryption,
|
* Used for decrypting when loading/filling the timeline, and retrying decryption,
|
||||||
* not during sync, where it is split up during the multiple phases.
|
* not during sync, where it is split up during the multiple phases.
|
||||||
*/
|
*/
|
||||||
_decryptEntries(source, entries, inboundSessionTxn = null, log = null) {
|
_decryptEntries(source, entries, inboundSessionTxn, log = null) {
|
||||||
const request = new DecryptionRequest(async (r, log) => {
|
const request = new DecryptionRequest(async (r, log) => {
|
||||||
if (!inboundSessionTxn) {
|
if (!inboundSessionTxn) {
|
||||||
inboundSessionTxn = await this._storage.readTxn([this._storage.storeNames.inboundGroupSessions]);
|
inboundSessionTxn = await this._storage.readTxn([this._storage.storeNames.inboundGroupSessions]);
|
||||||
|
@ -511,7 +511,7 @@ export class Room extends EventEmitter {
|
||||||
}
|
}
|
||||||
await txn.complete();
|
await txn.complete();
|
||||||
if (this._roomEncryption) {
|
if (this._roomEncryption) {
|
||||||
const decryptRequest = this._decryptEntries(DecryptionSource.Timeline, gapResult.entries, log);
|
const decryptRequest = this._decryptEntries(DecryptionSource.Timeline, gapResult.entries, null, log);
|
||||||
await decryptRequest.complete();
|
await decryptRequest.complete();
|
||||||
}
|
}
|
||||||
// once txn is committed, update in-memory state & emit events
|
// once txn is committed, update in-memory state & emit events
|
||||||
|
|
Loading…
Reference in a new issue