summary refs log tree commit diff
path: root/src/timeline/TimelineModel.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-11-25 23:43:31 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2020-11-25 23:54:25 +0100
commitc31b9e27939a2f756056a818d83c64c9e43b721d (patch)
treeae7b274ea984b419be0dc48cb585a4ea369243d3 /src/timeline/TimelineModel.cpp
parentAdd some db logging and clean up avatar urls a bit (diff)
downloadnheko-c31b9e27939a2f756056a818d83c64c9e43b721d.tar.xz
Fix race when reading members from db
Diffstat (limited to 'src/timeline/TimelineModel.cpp')
-rw-r--r--src/timeline/TimelineModel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index 4cbd5777..53791c98 100644
--- a/src/timeline/TimelineModel.cpp
+++ b/src/timeline/TimelineModel.cpp
@@ -709,7 +709,10 @@ TimelineModel::updateLastMessage()
                         continue;
 
                 auto description = utils::getMessageDescription(
-                  *event, QString::fromStdString(http::client()->user_id().to_string()), room_id_);
+                  *event,
+                  QString::fromStdString(http::client()->user_id().to_string()),
+                  cache::displayName(room_id_,
+                                     QString::fromStdString(mtx::accessors::sender(*event))));
                 emit manager_->updateRoomsLastMessage(room_id_, description);
                 return;
         }