From fb53fc86b67efd17288df24dba72085018c29eac Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Thu, 9 Sep 2021 21:31:23 -0400 Subject: Fix invites crashing the whole app --- src/timeline/RoomlistModel.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/timeline/RoomlistModel.cpp') 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 {}; } -- cgit 1.5.1