diff --git a/src/lib/hooks/useNotificationHandler.ts b/src/lib/hooks/useNotificationHandler.ts index d31e9768e5..347062bebe 100644 --- a/src/lib/hooks/useNotificationHandler.ts +++ b/src/lib/hooks/useNotificationHandler.ts @@ -103,9 +103,27 @@ export function useNotificationsHandler() { } else { navigation.dispatch(state => { if (state.routes[0].name === 'Messages') { - return CommonActions.navigate('MessagesConversation', { - conversation: payload.convoId, - }) + if ( + state.routes[state.routes.length - 1].name === + 'MessagesConversation' + ) { + return CommonActions.reset({ + ...state, + routes: [ + ...state.routes.slice(0, state.routes.length - 1), + { + name: 'MessagesConversation', + params: { + conversation: payload.convoId, + }, + }, + ], + }) + } else { + return CommonActions.navigate('MessagesConversation', { + conversation: payload.convoId, + }) + } } else { return CommonActions.navigate('MessagesTab', { screen: 'Messages',