summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2022-04-02 19:07:20 -0400
committerLoren Burkholder <computersemiexpert@outlook.com>2022-04-02 19:07:20 -0400
commit3bb00aa96cd3c4206a722aaa1124071aaad858e0 (patch)
tree7b0ba47f3f932680e2273e47849213f6f40f3815 /src
parentlint (diff)
downloadnheko-3bb00aa96cd3c4206a722aaa1124071aaad858e0.tar.xz
Don't treat a space as a direct chat
Diffstat (limited to 'src')
-rw-r--r--src/ChatPage.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp

index 8dbba488..7d91c854 100644 --- a/src/ChatPage.cpp +++ b/src/ChatPage.cpp
@@ -1241,7 +1241,8 @@ ChatPage::startChat(QString userid, std::optional<bool> encryptionEnabled) auto room_infos = cache::getRoomInfo(joined_rooms); for (const std::string &room_id : joined_rooms) { - if (room_infos[QString::fromStdString(room_id)].member_count == 2) { + if (const auto &info = room_infos[QString::fromStdString(room_id)]; + info.member_count == 2 && !info.is_space) { auto room_members = cache::roomMembers(room_id); if (std::find(room_members.begin(), room_members.end(), (userid).toStdString()) != room_members.end()) {