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