aboutsummaryrefslogtreecommitdiff
path: root/src/services/notifications_fetcher/notifications_fetcher.service.js
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2022-08-09 21:56:15 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2022-08-09 21:56:15 +0000
commit750696643ffde27c1e8ae5a50253bbee5bfc4249 (patch)
tree0d6cf88d2ae191f79b604057d5a06b322b77d2aa /src/services/notifications_fetcher/notifications_fetcher.service.js
parent7773e7de6454a7ecd79b695ba27cccabeaca184e (diff)
parent572f28d7c9efea4300cb88063baf4daab91e7910 (diff)
Merge branch 'feat/report-notification' into 'develop'
#949 Feat/report notification See merge request pleroma/pleroma-fe!1322
Diffstat (limited to 'src/services/notifications_fetcher/notifications_fetcher.service.js')
-rw-r--r--src/services/notifications_fetcher/notifications_fetcher.service.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/services/notifications_fetcher/notifications_fetcher.service.js b/src/services/notifications_fetcher/notifications_fetcher.service.js
index c0e299e4..6c247210 100644
--- a/src/services/notifications_fetcher/notifications_fetcher.service.js
+++ b/src/services/notifications_fetcher/notifications_fetcher.service.js
@@ -1,6 +1,18 @@
import apiService from '../api/api.service.js'
import { promiseInterval } from '../promise_interval/promise_interval.js'
+// For using include_types when fetching notifications.
+// Note: chat_mention excluded as pleroma-fe polls them separately
+const mastoApiNotificationTypes = [
+ 'mention',
+ 'favourite',
+ 'reblog',
+ 'follow',
+ 'move',
+ 'pleroma:emoji_reaction',
+ 'pleroma:report'
+]
+
const update = ({ store, notifications, older }) => {
store.dispatch('addNewNotifications', { notifications, older })
}
@@ -12,6 +24,7 @@ const fetchAndUpdate = ({ store, credentials, older = false, since }) => {
const timelineData = rootState.statuses.notifications
const hideMutedPosts = getters.mergedConfig.hideMutedPosts
+ args.includeTypes = mastoApiNotificationTypes
args.withMuted = !hideMutedPosts
args.timeline = 'notifications'
@@ -63,6 +76,7 @@ const fetchNotifications = ({ store, args, older }) => {
messageArgs: [error.message],
timeout: 5000
})
+ console.error(error)
})
}