Notifications: import target account during streaming event for Move notification

remove-account-counters-reducer
Alex Gleason 2021-07-15 10:52:23 -05:00
rodzic a973cfbd60
commit c5fa16f581
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 11 dodań i 4 usunięć

Wyświetl plik

@ -56,13 +56,20 @@ export function updateNotifications(notification, intlMessages, intlLocale) {
return (dispatch, getState) => {
const showInColumn = getSettings(getState()).getIn(['notifications', 'shows', notification.type], true);
if (showInColumn) {
if (notification.account) {
dispatch(importFetchedAccount(notification.account));
}
if (notification.status) {
dispatch(importFetchedStatus(notification.status));
}
// Used by Move notification
if (notification.target) {
dispatch(importFetchedAccount(notification.target));
}
if (notification.status) {
dispatch(importFetchedStatus(notification.status));
}
if (showInColumn) {
dispatch({
type: NOTIFICATIONS_UPDATE,
notification,