Don't try setting up push notifications when there's no endpoint

This commit is contained in:
Tobias Fella
2024-02-20 18:19:49 +01:00
parent a10da64378
commit bac5fa8c14

View File

@@ -102,7 +102,9 @@ Controller::Controller(QObject *parent)
NotificationsManager::instance().handleNotifications(connection);
});
connectSingleShot(connection, &NeoChatConnection::syncDone, this, [this, connection] {
connection->setupPushNotifications(m_endpoint);
if (!m_endpoint.isEmpty()) {
connection->setupPushNotifications(m_endpoint);
}
});
}
oldAccountCount = m_accountRegistry.size();