Remove the dependence on RoomManager from NeochatConnection.

At the same time use the roomCreated signal from connection for auto resolving as it's specifically designed for user created rooms.
This commit is contained in:
James Graham
2024-10-05 18:21:06 +01:00
parent aedba5c650
commit d7d9f254ff
3 changed files with 12 additions and 20 deletions

View File

@@ -445,6 +445,10 @@ void RoomManager::setConnection(NeoChatConnection *connection)
m_connection = connection;
if (m_connection != nullptr) {
connect(m_connection, &NeoChatConnection::showMessage, this, &RoomManager::showMessage);
connect(m_connection, &NeoChatConnection::createdRoom, this, [this](Quotient::Room *room) {
resolveResource(room->id());
});
connect(m_connection, &NeoChatConnection::directChatAvailable, this, [this](Quotient::Room *directChat) {
resolveResource(directChat->id());
});