crypto: Log when we receive room keys

master
Damir Jelić 2021-02-17 16:01:51 +01:00
parent 5ca40b9893
commit 2a09e588f3
2 changed files with 16 additions and 0 deletions

View File

@ -664,6 +664,15 @@ impl KeyRequestMachine {
Some(session)
};
if let Some(s) = &session {
info!(
"Received a forwarded room key from {} for room {} with session id {}",
event.sender,
s.room_id(),
s.session_id()
);
}
Ok((
Some(AnyToDeviceEvent::ForwardedRoomKey(event.clone())),
session,

View File

@ -598,6 +598,13 @@ impl OlmMachine {
&event.content.room_id,
session_key,
)?;
info!(
"Received a new room key from {} for room {} with session id {}",
event.sender,
event.content.room_id,
session.session_id()
);
let event = AnyToDeviceEvent::RoomKey(event.clone());
Ok((Some(event), Some(session)))
}