Skip to content
Snippets Groups Projects
Unverified Commit 747fe640 authored by Nicolas Werner's avatar Nicolas Werner Committed by GitHub
Browse files

Merge pull request #1036 from Nheko-Reborn/fixCreateDirectChat

Don't treat a space as a direct chat
parents a100a5b2 3bb00aa9
No related branches found
No related tags found
No related merge requests found
Pipeline #2939 passed
......@@ -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()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment