From 8d99cfd24f09bb8467e143d7cf305f0fe81ebcc5 Mon Sep 17 00:00:00 2001 From: Chewbacca Date: Fri, 4 Nov 2022 07:37:05 -0400 Subject: [PATCH] Invalid individual Chat query on chat acceptance --- app/soapbox/queries/chats.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/app/soapbox/queries/chats.ts b/app/soapbox/queries/chats.ts index 0423b29b6..945cb76c6 100644 --- a/app/soapbox/queries/chats.ts +++ b/app/soapbox/queries/chats.ts @@ -268,6 +268,7 @@ const useChatActions = (chatId: string) => { const acceptChat = useMutation(() => api.post(`/api/v1/pleroma/chats/${chatId}/accept`), { onSuccess(response) { changeScreen(ChatWidgetScreens.CHAT, response.data.id); + queryClient.invalidateQueries(ChatKeys.chat(chatId)); queryClient.invalidateQueries(ChatKeys.chatMessages(chatId)); queryClient.invalidateQueries(ChatKeys.chatSearch()); },