crypto: Log when we invalidate a group session.

master
Damir Jelić 2020-10-08 14:03:01 +02:00
parent 723fdeaa06
commit da5ef42719
1 changed files with 6 additions and 1 deletions

View File

@ -24,7 +24,7 @@ use matrix_sdk_common::{
identifiers::{RoomId, UserId}, identifiers::{RoomId, UserId},
uuid::Uuid, uuid::Uuid,
}; };
use tracing::debug; use tracing::{debug, info};
use crate::{ use crate::{
error::{EventError, MegolmResult, OlmResult}, error::{EventError, MegolmResult, OlmResult},
@ -70,6 +70,11 @@ impl GroupSessionManager {
pub fn invalidate_sessions_new_devices(&self, users: &HashSet<&UserId>) { pub fn invalidate_sessions_new_devices(&self, users: &HashSet<&UserId>) {
for session in self.outbound_group_sessions.iter() { for session in self.outbound_group_sessions.iter() {
if users.iter().any(|u| session.contains_recipient(u)) { if users.iter().any(|u| session.contains_recipient(u)) {
info!(
"Invalidating outobund session {} for room {}",
session.session_id(),
session.room_id()
);
session.invalidate_session(); session.invalidate_session();
if !session.shared() { if !session.shared() {