Skip to content

Commit d23c3cb

Browse files
authored
Improve logging in legacy megolm code (#3043)
* Use a PrefixedLogger throughout `megolm.ts` Rather than manually adding `in ${this.roomId}` to each log line, use a PrefixedLogger to achieve the same effect more consistently. * Clean up logging in megolm.ts Where we log a list of devices, we don't need the whole deviceinfo, just the device id. All that noise makes it very hard to read the logs. * Log users that we find in the room when encrypting * Reduce log verbosity on decryption retries
1 parent 9e37980 commit d23c3cb

File tree

2 files changed

+130
-84
lines changed

2 files changed

+130
-84
lines changed

spec/unit/crypto/algorithms/megolm.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,10 @@ describe("MegolmDecryption", function () {
387387
mockCrypto.baseApis = mockBaseApis;
388388

389389
mockRoom = {
390+
roomId: ROOM_ID,
390391
getEncryptionTargetMembers: jest.fn().mockReturnValue([{ userId: "@alice:home.server" }]),
391392
getBlacklistUnverifiedDevices: jest.fn().mockReturnValue(false),
393+
shouldEncryptForInvitedMembers: jest.fn().mockReturnValue(false),
392394
} as unknown as Room;
393395
});
394396

0 commit comments

Comments
 (0)