Better cleanup, leave room for more
This commit is contained in:
@@ -288,7 +288,7 @@ export class Convo {
|
|||||||
if (this.convo) {
|
if (this.convo) {
|
||||||
this.status = ConvoStatus.Ready
|
this.status = ConvoStatus.Ready
|
||||||
this.refreshConvo()
|
this.refreshConvo()
|
||||||
this.batchRetryPendingMessages()
|
this.attemptCleanup()
|
||||||
} else {
|
} else {
|
||||||
this.status = ConvoStatus.Initializing
|
this.status = ConvoStatus.Initializing
|
||||||
this.setup()
|
this.setup()
|
||||||
@@ -392,6 +392,12 @@ export class Convo {
|
|||||||
this.dispatch({event: ConvoDispatchEvent.Init})
|
this.dispatch({event: ConvoDispatchEvent.Init})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private attemptCleanup() {
|
||||||
|
// override what's here in case remote convo state has changed
|
||||||
|
this.pendingMessageFailure = 'recoverable'
|
||||||
|
this.batchRetryPendingMessages()
|
||||||
|
}
|
||||||
|
|
||||||
private async setup() {
|
private async setup() {
|
||||||
try {
|
try {
|
||||||
const {convo, sender, recipients} = await this.fetchConvo()
|
const {convo, sender, recipients} = await this.fetchConvo()
|
||||||
|
|||||||
Reference in New Issue
Block a user