(fix): chat issues when sending messages
All checks were successful
/ build-web (push) Successful in 1m23s
/ build-desktop (linux) (push) Successful in 6m29s
/ build-mobile (push) Successful in 15m9s
/ release (push) Successful in 31s

This commit is contained in:
Alois 2026-06-14 01:45:20 +02:00
commit 4a0f9e3b58
2 changed files with 76 additions and 33 deletions

View file

@ -266,7 +266,11 @@ export default function Provider(props: { children: ReactNode }) {
return updated ? next : prev;
});
const queryKey = ["chat-messages", String(userIdValue)] as const;
const queryKey = [
"chat-messages",
String(userIdValue),
currentSharedSecret.length > 0,
] as const;
queryClient.setQueryData<InfiniteData<RawMessages>>(
queryKey,
(current) => {
@ -301,7 +305,7 @@ export default function Provider(props: { children: ReactNode }) {
},
);
});
}, [subscribePush, userIdValue]);
}, [currentSharedSecret, subscribePush, userIdValue]);
return (
<QueryClientProvider client={queryClient}>