From 86bc18b99cc539949934e22f92f430f040117b21 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Sun, 22 Mar 2026 11:21:35 +0100 Subject: Single auth service, and msyncd restart - Use the microblog service for all auth - Restart msyncd on install if it's running --- .../mastodondatatypesyncadaptor.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodondatatypesyncadaptor.cpp') diff --git a/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodondatatypesyncadaptor.cpp b/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodondatatypesyncadaptor.cpp index 14b3511..ddf6686 100644 --- a/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodondatatypesyncadaptor.cpp +++ b/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodondatatypesyncadaptor.cpp @@ -81,6 +81,11 @@ QString MastodonNotificationsDataTypeSyncAdaptor::apiHost(int accountId) const return m_apiHosts.value(accountId, QStringLiteral("https://mastodon.social")); } +QString MastodonNotificationsDataTypeSyncAdaptor::authServiceName() const +{ + return syncServiceName(); +} + void MastodonNotificationsDataTypeSyncAdaptor::errorHandler(QNetworkReply::NetworkError err) { QNetworkReply *reply = qobject_cast(sender()); @@ -125,7 +130,7 @@ void MastodonNotificationsDataTypeSyncAdaptor::sslErrorsHandler(const QListid(); - Accounts::Service srv(m_accountManager->service(syncServiceName())); + Accounts::Service srv(m_accountManager->service(authServiceName())); account->selectService(srv); account->setValue(QStringLiteral("CredentialsNeedUpdate"), QVariant::fromValue(true)); account->setValue(QStringLiteral("CredentialsNeedUpdateFrom"), QVariant::fromValue(QString::fromLatin1("sociald-mastodon"))); @@ -141,8 +146,9 @@ void MastodonNotificationsDataTypeSyncAdaptor::signIn(Accounts::Account *account return; } - Accounts::Service srv(m_accountManager->service(syncServiceName())); + Accounts::Service srv(m_accountManager->service(authServiceName())); account->selectService(srv); + SignOn::Identity *identity = account->credentialsId() > 0 ? SignOn::Identity::existingIdentity(account->credentialsId()) : 0; -- cgit v1.2.3