summary refs log tree commit diff
path: root/src/timeline/TimelineModel.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-11-19 20:09:38 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2023-11-19 20:11:21 +0100
commitff82452816449eb9ccea872bf192cf153d596858 (patch)
tree15beb18e9239c30f5f2ca44533bf07847c3482cf /src/timeline/TimelineModel.cpp
parentTranslated using Weblate (Chinese (Simplified)) (diff)
downloadnheko-ff82452816449eb9ccea872bf192cf153d596858.tar.xz
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.
Diffstat (limited to 'src/timeline/TimelineModel.cpp')
-rw-r--r--src/timeline/TimelineModel.cpp3
1 files changed, 1 insertions, 2 deletions
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<mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>>( &*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;