aboutsummaryrefslogtreecommitdiff
path: root/src/services/notifications_fetcher/notifications_fetcher.service.js
diff options
context:
space:
mode:
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, 7 insertions, 7 deletions
diff --git a/src/services/notifications_fetcher/notifications_fetcher.service.js b/src/services/notifications_fetcher/notifications_fetcher.service.js
index cb241e33..6c247210 100644
--- a/src/services/notifications_fetcher/notifications_fetcher.service.js
+++ b/src/services/notifications_fetcher/notifications_fetcher.service.js
@@ -24,21 +24,21 @@ const fetchAndUpdate = ({ store, credentials, older = false, since }) => {
const timelineData = rootState.statuses.notifications
const hideMutedPosts = getters.mergedConfig.hideMutedPosts
- args['includeTypes'] = mastoApiNotificationTypes
- args['withMuted'] = !hideMutedPosts
+ args.includeTypes = mastoApiNotificationTypes
+ args.withMuted = !hideMutedPosts
- args['timeline'] = 'notifications'
+ args.timeline = 'notifications'
if (older) {
if (timelineData.minId !== Number.POSITIVE_INFINITY) {
- args['until'] = timelineData.minId
+ args.until = timelineData.minId
}
return fetchNotifications({ store, args, older })
} else {
// fetch new notifications
if (since === undefined && timelineData.maxId !== Number.POSITIVE_INFINITY) {
- args['since'] = timelineData.maxId
+ args.since = timelineData.maxId
} else if (since !== null) {
- args['since'] = since
+ args.since = since
}
const result = fetchNotifications({ store, args, older })
@@ -51,7 +51,7 @@ const fetchAndUpdate = ({ store, credentials, older = false, since }) => {
const readNotifsIds = notifications.filter(n => n.seen).map(n => n.id)
const numUnseenNotifs = notifications.length - readNotifsIds.length
if (numUnseenNotifs > 0 && readNotifsIds.length > 0) {
- args['since'] = Math.max(...readNotifsIds)
+ args.since = Math.max(...readNotifsIds)
fetchNotifications({ store, args, older })
}