Skip to content

Commit

Permalink
Avoid <sender>|<session> notation in log messages
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
richvdh committed Oct 25, 2024
1 parent b99ff83 commit b58d43a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rust-crypto/rust-crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, CryptoEventH
private onRoomKeyUpdated(key: RustSdkCryptoJs.RoomKeyInfo): void {
if (this.stopped) return;
this.logger.debug(
`Got update for session ${key.senderKey.toBase64()}|${key.sessionId} in ${key.roomId.toString()}`,
`Got update for session ${key.sessionId} from sender ${key.senderKey.toBase64()} in ${key.roomId.toString()}`,
);
const pendingList = this.eventDecryptor.getEventsPendingRoomKey(key.roomId.toString(), key.sessionId);
if (pendingList.length === 0) return;
Expand Down Expand Up @@ -1842,7 +1842,7 @@ class EventDecryptor {
serverBackupInfo: KeyBackupInfo | null | undefined,
): never {
const content = event.getWireContent();
const errorDetails = { session: content.sender_key + "|" + content.session_id };
const errorDetails = { sender_key: content.sender_key, session_id: content.session_id };

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

0 comments on commit b58d43a

Please sign in to comment.