crypto: Add a bit more info to the room key sharing logic logging

master
Damir Jelić 2021-03-02 17:15:10 +01:00
parent 6597948564
commit 93e5c34670
2 changed files with 20 additions and 3 deletions

View File

@ -226,9 +226,10 @@ impl OutboundGroupSession {
if self.to_share_with_set.is_empty() {
debug!(
"Marking session {} for room {} as shared.",
self.session_id(),
self.room_id
session_id = self.session_id(),
room_id = self.room_id.as_str(),
"All m.room_key to-device requests were sent out, marking \
session as shared.",
);
self.mark_as_shared();
}

View File

@ -427,6 +427,13 @@ impl GroupSessionManager {
let requests = outbound.pending_requests();
debug!(
room_id = room_id.as_str(),
session_id = outbound.session_id(),
request_count = requests.len(),
"Done generating to-device requests for a room key share"
);
if requests.is_empty() {
debug!(
room_id = room_id.as_str(),
@ -437,8 +444,17 @@ impl GroupSessionManager {
outbound.mark_as_shared();
}
let session_count = changes.sessions.len();
self.store.save_changes(changes).await?;
debug!(
room_id = room_id.as_str(),
session_id = outbound.session_id(),
session_count = session_count,
"Stored the changed sessions after encrypting an room key"
);
Ok(requests)
}
}