summaryrefslogtreecommitdiff
path: root/buteo-plugins
diff options
context:
space:
mode:
Diffstat (limited to 'buteo-plugins')
-rw-r--r--buteo-plugins/buteo-plugins.pro4
-rw-r--r--buteo-plugins/buteo-sync-plugin-mastodon-notifications/buteo-sync-plugin-mastodon-notifications.pro4
-rw-r--r--buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodon-notifications.xml3
-rw-r--r--buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodon.Notifications.xml5
-rw-r--r--buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodondatatypesyncadaptor.cpp10
-rw-r--r--buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodondatatypesyncadaptor.h1
-rw-r--r--buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.cpp5
-rw-r--r--buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.h1
-rw-r--r--buteo-plugins/buteo-sync-plugin-mastodon-posts/buteo-sync-plugin-mastodon-posts.pro4
-rw-r--r--buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodon-posts.xml3
-rw-r--r--buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodon.Posts.xml3
11 files changed, 36 insertions, 7 deletions
diff --git a/buteo-plugins/buteo-plugins.pro b/buteo-plugins/buteo-plugins.pro
index e0fc477..a64041b 100644
--- a/buteo-plugins/buteo-plugins.pro
+++ b/buteo-plugins/buteo-plugins.pro
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+
TEMPLATE = subdirs
SUBDIRS += \
buteo-sync-plugin-mastodon-posts \
diff --git a/buteo-plugins/buteo-sync-plugin-mastodon-notifications/buteo-sync-plugin-mastodon-notifications.pro b/buteo-plugins/buteo-sync-plugin-mastodon-notifications/buteo-sync-plugin-mastodon-notifications.pro
index 0cf375c..dda88ff 100644
--- a/buteo-plugins/buteo-sync-plugin-mastodon-notifications/buteo-sync-plugin-mastodon-notifications.pro
+++ b/buteo-plugins/buteo-sync-plugin-mastodon-notifications/buteo-sync-plugin-mastodon-notifications.pro
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+
TARGET = mastodon-notifications-client
QT -= gui
diff --git a/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodon-notifications.xml b/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodon-notifications.xml
index 8d042d9..3284d61 100644
--- a/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodon-notifications.xml
+++ b/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodon-notifications.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2013-2026 Jolla Ltd. -->
+<!-- SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. -->
+<!-- SPDX-License-Identifier: BSD-3-Clause -->
<profile name="mastodon-notifications" type="client" >
<field name="Sync Direction" />
</profile>
diff --git a/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodon.Notifications.xml b/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodon.Notifications.xml
index 0b6bad4..05d5218 100644
--- a/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodon.Notifications.xml
+++ b/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodon.Notifications.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2013-2026 Jolla Ltd. -->
+<!-- SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. -->
+<!-- SPDX-License-Identifier: BSD-3-Clause -->
<profile name="mastodon.Notifications" type="sync" >
<key name="category" value="eventfeed" />
<key name="enabled" value="true" />
@@ -8,7 +9,7 @@
<key name="hidden" value="true" />
<key name="displayname" value="Mastodon Notifications"/>
- <schedule enabled="true" interval="15" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="" />
+ <schedule enabled="true" interval="30" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="" />
<profile name="mastodon-notifications" type="client" >
<key name="Sync Direction" value="from-remote" />
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<QNetworkReply*>(sender());
@@ -125,7 +130,7 @@ void MastodonNotificationsDataTypeSyncAdaptor::sslErrorsHandler(const QList<QSsl
void MastodonNotificationsDataTypeSyncAdaptor::setCredentialsNeedUpdate(Accounts::Account *account)
{
qCInfo(lcMastodonNotificationsSync) << "sociald:Mastodon: setting CredentialsNeedUpdate to true for account:" << account->id();
- Accounts::Service srv(m_accountManager->service(syncServiceName()));
+ Accounts::Service srv(m_accountManager->service(authServiceName()));
account->selectService(srv);
account->setValue(QStringLiteral("CredentialsNeedUpdate"), QVariant::fromValue<bool>(true));
account->setValue(QStringLiteral("CredentialsNeedUpdateFrom"), QVariant::fromValue<QString>(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;
diff --git a/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodondatatypesyncadaptor.h b/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodondatatypesyncadaptor.h
index 3bb6e23..3c61ade 100644
--- a/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodondatatypesyncadaptor.h
+++ b/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodondatatypesyncadaptor.h
@@ -48,6 +48,7 @@ public:
protected:
QString apiHost(int accountId) const;
virtual void updateDataForAccount(int accountId);
+ virtual QString authServiceName() const;
virtual void beginSync(int accountId, const QString &accessToken) = 0;
protected Q_SLOTS:
diff --git a/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.cpp b/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.cpp
index 8a2c610..8d21782 100644
--- a/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.cpp
+++ b/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.cpp
@@ -303,6 +303,11 @@ QString MastodonNotificationsSyncAdaptor::syncServiceName() const
return QStringLiteral("mastodon-notifications");
}
+QString MastodonNotificationsSyncAdaptor::authServiceName() const
+{
+ return QStringLiteral("mastodon-microblog");
+}
+
void MastodonNotificationsSyncAdaptor::purgeDataForOldAccount(int oldId, SocialNetworkSyncAdaptor::PurgeMode)
{
closeAccountNotifications(oldId);
diff --git a/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.h b/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.h
index 9711549..4c667fa 100644
--- a/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.h
+++ b/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.h
@@ -41,6 +41,7 @@ public:
QString syncServiceName() const override;
protected:
+ QString authServiceName() const override;
void purgeDataForOldAccount(int oldId, SocialNetworkSyncAdaptor::PurgeMode mode) override;
void beginSync(int accountId, const QString &accessToken) override;
void finalize(int accountId) override;
diff --git a/buteo-plugins/buteo-sync-plugin-mastodon-posts/buteo-sync-plugin-mastodon-posts.pro b/buteo-plugins/buteo-sync-plugin-mastodon-posts/buteo-sync-plugin-mastodon-posts.pro
index 2f3fb5e..c25e5d4 100644
--- a/buteo-plugins/buteo-sync-plugin-mastodon-posts/buteo-sync-plugin-mastodon-posts.pro
+++ b/buteo-plugins/buteo-sync-plugin-mastodon-posts/buteo-sync-plugin-mastodon-posts.pro
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+
TARGET = mastodon-posts-client
QT -= gui
diff --git a/buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodon-posts.xml b/buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodon-posts.xml
index 53bd93a..c1e25ae 100644
--- a/buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodon-posts.xml
+++ b/buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodon-posts.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2013-2026 Jolla Ltd. -->
+<!-- SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. -->
+<!-- SPDX-License-Identifier: BSD-3-Clause -->
<profile name="mastodon-posts" type="client" >
<field name="Sync Direction" />
</profile>
diff --git a/buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodon.Posts.xml b/buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodon.Posts.xml
index 2904fa5..c7e2448 100644
--- a/buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodon.Posts.xml
+++ b/buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodon.Posts.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2013-2026 Jolla Ltd. -->
+<!-- SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. -->
+<!-- SPDX-License-Identifier: BSD-3-Clause -->
<profile name="mastodon.Posts" type="sync" >
<key name="category" value="eventfeed" />
<key name="enabled" value="false" />