Skip to content

Commit 3cc3bd0

Browse files
authored
Avoid <sender>|<session> notation in log messages (#4473)
We used to use the notation `<sender key>|<megolm session id>` fairly widely in log messages, but since the transition to rust crypto, it's unusual and now somewhat confusing. Make the log messages more explicit.
1 parent f891fe4 commit 3cc3bd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rust-crypto/rust-crypto.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, CryptoEventH
15371537
private onRoomKeyUpdated(key: RustSdkCryptoJs.RoomKeyInfo): void {
15381538
if (this.stopped) return;
15391539
this.logger.debug(
1540-
`Got update for session ${key.senderKey.toBase64()}|${key.sessionId} in ${key.roomId.toString()}`,
1540+
`Got update for session ${key.sessionId} from sender ${key.senderKey.toBase64()} in ${key.roomId.toString()}`,
15411541
);
15421542
const pendingList = this.eventDecryptor.getEventsPendingRoomKey(key.roomId.toString(), key.sessionId);
15431543
if (pendingList.length === 0) return;
@@ -1842,7 +1842,7 @@ class EventDecryptor {
18421842
serverBackupInfo: KeyBackupInfo | null | undefined,
18431843
): never {
18441844
const content = event.getWireContent();
1845-
const errorDetails = { session: content.sender_key + "|" + content.session_id };
1845+
const errorDetails = { sender_key: content.sender_key, session_id: content.session_id };
18461846

18471847
// If the error looks like it might be recoverable from backup, queue up a request to try that.
18481848
if (

0 commit comments

Comments
 (0)