This commit is contained in:
Eric Bailey
2024-05-08 15:32:11 -05:00
parent 2f0615c55e
commit 9a2768f5c2
2 changed files with 7 additions and 2 deletions
+1
View File
@@ -582,6 +582,7 @@ export class Convo {
error?.retry()
},
})
this.commit()
}
ingestFirehose(events: ChatBskyConvoGetLog.OutputSchema['logs']) {
+6 -2
View File
@@ -44,11 +44,15 @@ export function ConvoProvider({
const events = useMessagesEventBus()
React.useEffect(() => {
const remove = events.trailConvo(convoId, events => {
const trail = events.trailConvo(convoId, events => {
convo.ingestFirehose(events)
})
const onConnect = events.onConnect(convo.onFirehoseConnect)
const onError = events.onError(convo.onFirehoseError)
return () => {
remove()
trail()
onConnect()
onError()
}
}, [convoId, convo, events])