From c5fa16f5815484239b5afcb7046e604febecaa4f Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 15 Jul 2021 10:52:23 -0500 Subject: [PATCH] Notifications: import target account during streaming event for Move notification --- app/soapbox/actions/notifications.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/soapbox/actions/notifications.js b/app/soapbox/actions/notifications.js index 9e4d4e31d..e0d09c694 100644 --- a/app/soapbox/actions/notifications.js +++ b/app/soapbox/actions/notifications.js @@ -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,