diff options
| author | Shpuld Shpludson <shp@cock.li> | 2021-03-15 09:45:38 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2021-03-15 09:45:38 +0000 |
| commit | a00212a3bbc029439a27ba01895e01adf37a2db6 (patch) | |
| tree | 7848bf740d0e081501ccb194031329ce5980d337 /src/services/notifications_fetcher | |
| parent | 184364c7e06a982b48bbe6d913f02a73dd428aef (diff) | |
| parent | a8967d85bd7ae1541f1d4e41e95fc8fa111f2360 (diff) | |
Merge branch 'websocket-fixes' into 'develop'
Various websocket fixes
See merge request pleroma/pleroma-fe!1326
Diffstat (limited to 'src/services/notifications_fetcher')
| -rw-r--r-- | src/services/notifications_fetcher/notifications_fetcher.service.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/services/notifications_fetcher/notifications_fetcher.service.js b/src/services/notifications_fetcher/notifications_fetcher.service.js index beeb167c..f83f871e 100644 --- a/src/services/notifications_fetcher/notifications_fetcher.service.js +++ b/src/services/notifications_fetcher/notifications_fetcher.service.js @@ -5,7 +5,7 @@ const update = ({ store, notifications, older }) => { store.dispatch('addNewNotifications', { notifications, older }) } -const fetchAndUpdate = ({ store, credentials, older = false }) => { +const fetchAndUpdate = ({ store, credentials, older = false, since }) => { const args = { credentials } const { getters } = store const rootState = store.rootState || store.state @@ -22,8 +22,10 @@ const fetchAndUpdate = ({ store, credentials, older = false }) => { return fetchNotifications({ store, args, older }) } else { // fetch new notifications - if (timelineData.maxId !== Number.POSITIVE_INFINITY) { + if (since === undefined && timelineData.maxId !== Number.POSITIVE_INFINITY) { args['since'] = timelineData.maxId + } else if (since !== null) { + args['since'] = since } const result = fetchNotifications({ store, args, older }) |
