Skip to content

Commit

Permalink
fix conversation screen refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronvoell committed Dec 6, 2024
1 parent 2307c5e commit 2e5ca0b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion example/src/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ export function useMessages({
const { data: conversation } = useConversation({ topic })
return useQuery<DecodedMessage[]>(
['xmtp', 'messages', client?.address, conversation?.topic],
() => conversation!.messages(),
async () => {
await conversation!.sync()
return conversation!.messages()
},
{
enabled: !!client && !!topic && !!conversation,
}
Expand Down

0 comments on commit 2e5ca0b

Please sign in to comment.