Better cleanup, leave room for more
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user