summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2022-04-03 01:17:42 +0200
committerGitHub <noreply@github.com>2022-04-03 01:17:42 +0200
commit747fe6408d728fba9a5ee2051b399aba8cefa88e (patch)
tree6521f64668adf0029e002a028f0dbaa179e85c35 /src
parentMerge pull request #1033 from Apurv404/fix-room-alias-issue (diff)
parentDon't treat a space as a direct chat (diff)
downloadnheko-747fe6408d728fba9a5ee2051b399aba8cefa88e.tar.xz
Merge pull request #1036 from Nheko-Reborn/fixCreateDirectChat
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 e6b6235b..43455e86 100644 --- a/src/ChatPage.cpp +++ b/src/ChatPage.cpp
@@ -1248,7 +1248,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()) {