mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-17 04:32:22 +00:00
Fix accounts not getting imported into redux store for some filtered notification types (#29588)
This commit is contained in:
parent
0bc17a3d48
commit
95a5713ff7
|
@ -552,7 +552,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));
|
||||
|
@ -585,7 +588,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));
|
||||
|
|
Loading…
Reference in a new issue