Invalid individual Chat query on chat acceptance
This commit is contained in:
parent
472df260fe
commit
8d99cfd24f
1 changed files with 1 additions and 0 deletions
|
@ -268,6 +268,7 @@ const useChatActions = (chatId: string) => {
|
|||
const acceptChat = useMutation(() => api.post<IChat>(`/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());
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue