diff options
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/api.js | 13 | ||||
| -rw-r--r-- | src/modules/users.js | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/modules/api.js b/src/modules/api.js index 2be0f236..b482637d 100644 --- a/src/modules/api.js +++ b/src/modules/api.js @@ -188,6 +188,13 @@ const api = { if (!fetcher) return store.commit('removeFetcher', { fetcherName: timeline, fetcher }) }, + fetchTimeline (store, timeline, { ...rest }) { + store.state.backendInteractor.fetchTimeline({ + store, + timeline, + ...rest + }) + }, // Notifications startFetchingNotifications (store) { @@ -200,6 +207,12 @@ const api = { if (!fetcher) return store.commit('removeFetcher', { fetcherName: 'notifications', fetcher }) }, + fetchNotifications (store, { ...rest }) { + store.state.backendInteractor.fetchNotifications({ + store, + ...rest + }) + }, // Follow requests startFetchingFollowRequests (store) { diff --git a/src/modules/users.js b/src/modules/users.js index 655db4c7..ac52be1f 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -547,6 +547,8 @@ const users = { } if (store.getters.mergedConfig.useStreamingApi) { + store.dispatch('fetchTimeline', 'friends', { since: null }) + store.dispatch('fetchNotifications', { since: null }) store.dispatch('enableMastoSockets').catch((error) => { console.error('Failed initializing MastoAPI Streaming socket', error) startPolling() |
