Fix race when reading members from db

This commit is contained in:
Nicolas Werner 2020-11-25 23:43:31 +01:00
parent 7cda502edd
commit c31b9e2793
5 changed files with 52 additions and 29 deletions

View file

@ -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;
}