From ff82452816449eb9ccea872bf192cf153d596858 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 19 Nov 2023 20:09:38 +0100 Subject: Upgrade trust of megolm sessions when receiving RoomKey Before we only did that, when we basically didn't have the key yet. But since we usually get sent a RoomKey when a new message is sent after we sign in, we were discarding, that those messages should usually now be trusted. --- src/timeline/TimelineModel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/timeline/TimelineModel.cpp') diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index f4f2361c..ab0e3aef 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -854,8 +854,7 @@ TimelineModel::data(const mtx::events::collections::TimelineEvents &event, int r std::get_if>( &*encrypted_event)) { return olm::calculate_trust( - encrypted->sender, - MegolmSessionIndex(room_id_.toStdString(), encrypted->content)); + encrypted->sender, room_id_.toStdString(), encrypted->content); } } return crypto::Trust::Unverified; -- cgit 1.5.1