diff --git a/app/javascript/flavours/glitch/actions/notifications.js b/app/javascript/flavours/glitch/actions/notifications.js index d5f7477f68..5b274ff94c 100644 --- a/app/javascript/flavours/glitch/actions/notifications.js +++ b/app/javascript/flavours/glitch/actions/notifications.js @@ -640,7 +640,10 @@ export const fetchNotificationsForRequest = accountId => (dispatch, getState) => api(getState).get('/api/v1/notifications', { params }).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); + dispatch(importFetchedAccounts(response.data.map(item => item.account))); dispatch(importFetchedStatuses(response.data.map(item => item.status).filter(status => !!status))); + dispatch(importFetchedAccounts(response.data.filter(item => item.report).map(item => item.report.target_account))); + dispatch(fetchNotificationsForRequestSuccess(response.data, next?.uri)); }).catch(err => { dispatch(fetchNotificationsForRequestFail(err)); @@ -673,7 +676,10 @@ export const expandNotificationsForRequest = () => (dispatch, getState) => { api(getState).get(url).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); + dispatch(importFetchedAccounts(response.data.map(item => item.account))); dispatch(importFetchedStatuses(response.data.map(item => item.status).filter(status => !!status))); + dispatch(importFetchedAccounts(response.data.filter(item => item.report).map(item => item.report.target_account))); + dispatch(expandNotificationsForRequestSuccess(response.data, next?.uri)); }).catch(err => { dispatch(expandNotificationsForRequestFail(err));