mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-18 13:40:55 -04:00
Log if a session was created using a fallback key
This commit is contained in:
@@ -337,11 +337,16 @@ impl SessionManager {
|
||||
struct SessionInfo {
|
||||
session_id: String,
|
||||
algorithm: EventEncryptionAlgorithm,
|
||||
fallback_key_used: bool,
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for SessionInfo {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "session_id: {}, algorithm: {}", self.session_id, self.algorithm.as_str())
|
||||
write!(
|
||||
f,
|
||||
"session_id: {}, algorithm: {}, fallback_key_used {}",
|
||||
self.session_id, self.algorithm, self.fallback_key_used
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -401,6 +406,7 @@ impl SessionManager {
|
||||
let session_info = SessionInfo {
|
||||
session_id: session.session_id().to_owned(),
|
||||
algorithm: session.algorithm().await,
|
||||
fallback_key_used: session.created_using_fallback_key,
|
||||
};
|
||||
|
||||
changes.sessions.push(session);
|
||||
|
||||
Reference in New Issue
Block a user