Skip to content

Commit

Permalink
Alter Outbox logic to handle automated messages better
Browse files Browse the repository at this point in the history
Signed-off-by: SebastianKrupinski <[email protected]>
  • Loading branch information
SebastianKrupinski committed Aug 27, 2024
1 parent 82faa19 commit 02436c3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/OutboxMessageListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default {
failed: false,
sendAt: (new Date().getTime() + UNDO_DELAY) / 1000,
}
await this.outboxStore.updateMessage({ message, id: message.id })
await this.outboxStore.sendMessage({ id: message.id, force: true })
try {
if (this.message.status !== STATUS_IMAP_SENT_MAILBOX_FAIL) {
await this.outboxStore.sendMessageWithUndo({ id: message.id })
Expand All @@ -160,15 +160,15 @@ export default {
}
} catch (error) {
logger.error('Could not send or copy message', { error })
if (error.data !== undefined) {
await this.outboxStore.updateMessage({ message: error.data[0], id: message.id })
}
}
},
async openModal() {
if (this.message.status === STATUS_IMAP_SENT_MAILBOX_FAIL) {
return
}
if (this.message.editorBody === null) {
return
}
await this.$store.dispatch('startComposerSession', {
type: 'outbox',
data: {
Expand Down

0 comments on commit 02436c3

Please sign in to comment.