summary refs log tree commit diff
path: root/src/timeline/RoomlistModel.cpp
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2021-09-09 21:31:23 -0400
committerLoren Burkholder <computersemiexpert@outlook.com>2021-09-11 19:35:31 -0400
commitfb53fc86b67efd17288df24dba72085018c29eac (patch)
tree4ad446730d4a7fecb31ab177bc223c6cbe46c931 /src/timeline/RoomlistModel.cpp
parentUse correct form of roomId (diff)
downloadnheko-fb53fc86b67efd17288df24dba72085018c29eac.tar.xz
Fix invites crashing the whole app
Diffstat (limited to '')
-rw-r--r--src/timeline/RoomlistModel.cpp5
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 {}; }