1 files changed, 1 insertions, 4 deletions
diff --git a/src/timeline/RoomlistModel.cpp b/src/timeline/RoomlistModel.cpp
index a423090c..e1234895 100644
--- a/src/timeline/RoomlistModel.cpp
+++ b/src/timeline/RoomlistModel.cpp
@@ -167,10 +167,7 @@ RoomlistModel::data(const QModelIndex &index, int role) const
case Roles::IsDirect:
return room.member_count == 1;
case Roles::DirectChatOtherUserId:
- // if this is a direct chat, the front member is correct; otherwise,
- // it won't be used anyway
- return QString::fromStdString(
- cache::roomMembers(roomid.toStdString()).front());
+ return cache::getDirectInviteMember(roomid.toStdString()).user_id;
default:
return {};
}
|