Better cleanup, leave room for more

This commit is contained in:
Eric Bailey
2024-05-15 17:28:47 -05:00
parent 64daaada3f
commit 4df61f7fff
+7 -1
View File
@@ -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()