Join rooms when visiting them

BUG: 477261
This commit is contained in:
Tobias Fella
2023-11-24 16:33:40 +01:00
parent 6baf2e4888
commit 410258c478
4 changed files with 9 additions and 3 deletions

View File

@@ -95,6 +95,12 @@ void RoomManager::openResource(const QString &idOrUri, const QString &action)
Q_EMIT warning(i18n("Room not found"), i18n("There's no room %1 in the room list. Check the spelling and the account.", idOrUri));
} else { // Invalid cases should have been eliminated earlier
Q_ASSERT(result == Quotient::UriResolved);
if (uri.type() == Uri::RoomAlias || uri.type() == Uri::RoomId) {
connectSingleShot(m_connection, &Connection::newRoom, this, [this, uri](Room *room) {
enterRoom(dynamic_cast<NeoChatRoom *>(room));
});
}
}
}