Update history handling

(cherry picked from commit b82b552ba4040adf7ead2377541132a386964ff8)
This commit is contained in:
Eric Bailey
2024-05-07 10:28:44 -05:00
parent b04ba05063
commit e38d398de0
+4 -3
View File
@@ -371,14 +371,15 @@ export class Convo {
case ConvoDispatchEvent.Ready: {
this.status = ConvoStatus.Ready
this.pollInterval = ACTIVE_POLL_INTERVAL
this.fetchMessageHistory()
this.initiatePoll()
this.fetchMessageHistory().then(() => {
this.initiatePoll()
})
break
}
case ConvoDispatchEvent.Background: {
this.status = ConvoStatus.Backgrounded
this.pollInterval = BACKGROUND_POLL_INTERVAL
this.fetchMessageHistory()
// TODO truncate history, then poll again
this.initiatePoll()
break
}