From 600dbd06033a50e52e27e988af01d650d2e86b2f Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Fri, 10 Nov 2023 11:36:21 -0500 Subject: [PATCH] Remove unnecessary activeConnection() call in setupPushNotifications --- src/neochatconnection.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/neochatconnection.cpp b/src/neochatconnection.cpp index 5d9aa564b..f4decc9ea 100644 --- a/src/neochatconnection.cpp +++ b/src/neochatconnection.cpp @@ -269,15 +269,14 @@ QCoro::Task NeoChatConnection::setupPushNotifications(QString endpoint) // Pop the slash off of the path const QString pushkey = endpointUrl.path().removeFirst(); - Controller::instance().activeConnection()->callApi( - pushkey, - QStringLiteral("http"), - QStringLiteral("org.kde.neochat"), - QStringLiteral("NeoChat"), - Controller::instance().activeConnection()->deviceId(), - QString(), // FIXME: what is profileTag? - QStringLiteral("en"), - PostPusherJob::PusherData{QUrl::fromUserInput(gatewayEndpoint.toString()), QStringLiteral(" ")}); + callApi(pushkey, + QStringLiteral("http"), + QStringLiteral("org.kde.neochat"), + QStringLiteral("NeoChat"), + deviceId(), + QString(), // FIXME: what is profileTag? + QStringLiteral("en"), + PostPusherJob::PusherData{QUrl::fromUserInput(gatewayEndpoint.toString()), QStringLiteral(" ")}); qInfo() << "Registered for push notifications"; } else {