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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user