diff --git a/src/state/messages/convo/agent.ts b/src/state/messages/convo/agent.ts index fea4630f0f..3e4cabfdc4 100644 --- a/src/state/messages/convo/agent.ts +++ b/src/state/messages/convo/agent.ts @@ -288,7 +288,7 @@ export class Convo { if (this.convo) { this.status = ConvoStatus.Ready this.refreshConvo() - this.batchRetryPendingMessages() + this.attemptCleanup() } else { this.status = ConvoStatus.Initializing this.setup() @@ -392,6 +392,12 @@ export class Convo { 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() { try { const {convo, sender, recipients} = await this.fetchConvo()