diff options
| author | kPherox <admin@mail.kr-kp.com> | 2020-02-04 04:37:29 +0900 |
|---|---|---|
| committer | kPherox <admin@mail.kr-kp.com> | 2020-02-04 04:54:36 +0900 |
| commit | a06f3a7fbc40cd51df3c2d04406494cf60b0cf8a (patch) | |
| tree | 7171b468904bd0aa790e965e66ebfca636ecab12 | |
| parent | 9b7497a65957b3f1d3b9f920266fae9bdae11dd5 (diff) | |
Add `with_move` param for fetching notification
| -rw-r--r-- | src/services/api/api.service.js | 6 | ||||
| -rw-r--r-- | src/services/notifications_fetcher/notifications_fetcher.service.js | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 11aa0675..b794fd58 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -495,7 +495,8 @@ const fetchTimeline = ({ until = false, userId = false, tag = false, - withMuted = false + withMuted = false, + withMove = false }) => { const timelineUrls = { public: MASTODON_PUBLIC_TIMELINE, @@ -535,6 +536,9 @@ const fetchTimeline = ({ if (timeline === 'public' || timeline === 'publicAndExternal') { params.push(['only_media', false]) } + if (timeline === 'notifications') { + params.push(['with_move', withMove]) + } params.push(['count', 20]) params.push(['with_muted', withMuted]) diff --git a/src/services/notifications_fetcher/notifications_fetcher.service.js b/src/services/notifications_fetcher/notifications_fetcher.service.js index 64499a1b..864e32f8 100644 --- a/src/services/notifications_fetcher/notifications_fetcher.service.js +++ b/src/services/notifications_fetcher/notifications_fetcher.service.js @@ -11,9 +11,12 @@ const fetchAndUpdate = ({ store, credentials, older = false }) => { const rootState = store.rootState || store.state const timelineData = rootState.statuses.notifications const hideMutedPosts = getters.mergedConfig.hideMutedPosts + const allowFollowingMove = rootState.users.currentUser.allow_following_move args['withMuted'] = !hideMutedPosts + args['withMove'] = !allowFollowingMove + args['timeline'] = 'notifications' if (older) { if (timelineData.minId !== Number.POSITIVE_INFINITY) { |
