diff --git a/packages/frontend/src/api/useDialogByIdSubscription.ts b/packages/frontend/src/api/useDialogByIdSubscription.ts index bd925bcc..03f67b87 100644 --- a/packages/frontend/src/api/useDialogByIdSubscription.ts +++ b/packages/frontend/src/api/useDialogByIdSubscription.ts @@ -29,6 +29,7 @@ export const useDialogByIdSubscription = (dialogId: string | undefined, dialogTo if (updatedType && updatedType === DialogEventType.DialogDeleted) { // Redirect to inbox if the dialog was deleted navigate(PageRoutes.inbox); + void queryClient.invalidateQueries({ queryKey: [QUERY_KEYS.DIALOGS] }); } else if (updatedType && updatedType === DialogEventType.DialogUpdated) { void queryClient.invalidateQueries({ queryKey: [QUERY_KEYS.DIALOG_BY_ID] }); }