Update history handling
(cherry picked from commit b82b552ba4040adf7ead2377541132a386964ff8)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user