Make sure that we don't immediately open all new rooms

Some confusing interaction with the code removed here causes us to open all rooms that come in.
We generally don't want that. I also don't understand why we're connecting for new rooms here - the room is already available in this case.
This commit is contained in:
Tobias Fella
2024-10-10 21:13:50 +02:00
parent 005b7a760c
commit 0bda65b5ac

View File

@@ -158,21 +158,6 @@ void RoomManager::resolveResource(const QString &idOrUri, const QString &action)
if ((uri.type() == Uri::RoomAlias || uri.type() == Uri::RoomId) && action != "no_join"_ls) {
Q_EMIT askJoinRoom(uri.primaryId());
}
} else {
if (result != Quotient::UriResolved) {
return;
}
if (uri.type() == Uri::RoomAlias || uri.type() == Uri::RoomId) {
connect(
m_connection.get(),
&NeoChatConnection::newRoom,
this,
[this, uri](Room *room) {
resolveResource(room->id());
},
Qt::SingleShotConnection);
}
}
}