diff options
| author | Shpuld Shpuldson <shp@cock.li> | 2021-02-01 12:55:23 +0200 |
|---|---|---|
| committer | Shpuld Shpuldson <shp@cock.li> | 2021-02-01 12:55:23 +0200 |
| commit | 3822a73a49f82c71217bc610720324a4303626cf (patch) | |
| tree | aae217d5cd8b46e010250fa8960c1f9aa08f0e4e /src/services/notifications_fetcher/notifications_fetcher.service.js | |
| parent | 8334649c1137264f2987295847144fb1799e71c6 (diff) | |
Fix report modal not working, add include_types
Diffstat (limited to 'src/services/notifications_fetcher/notifications_fetcher.service.js')
| -rw-r--r-- | src/services/notifications_fetcher/notifications_fetcher.service.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/services/notifications_fetcher/notifications_fetcher.service.js b/src/services/notifications_fetcher/notifications_fetcher.service.js index 91861b21..2da6d646 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,9 @@ const fetchAndUpdate = ({ store, credentials, older = false }) => { const timelineData = rootState.statuses.notifications const hideMutedPosts = getters.mergedConfig.hideMutedPosts + if (rootState.users.currentUser.role === 'admin') { + args['includeTypes'] = mastoApiNotificationTypes + } args['withMuted'] = !hideMutedPosts args['timeline'] = 'notifications' |
