From 1abf150641ce1c61dfbd83a11b859bc43c05f67f Mon Sep 17 00:00:00 2001 From: SebastianKrupinski Date: Wed, 28 Aug 2024 10:10:08 -0400 Subject: [PATCH] fixup! Alter Outbox logic to handle automated messages better --- lib/Controller/OutboxController.php | 2 +- src/components/OutboxMessageListItem.vue | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Controller/OutboxController.php b/lib/Controller/OutboxController.php index 2429a3589f..e12ee31eaf 100644 --- a/lib/Controller/OutboxController.php +++ b/lib/Controller/OutboxController.php @@ -180,7 +180,7 @@ public function update( int $accountId, string $subject, string $body, - string $editorBody, + ?string $editorBody, bool $isHtml, bool $smimeSign, bool $smimeEncrypt, diff --git a/src/components/OutboxMessageListItem.vue b/src/components/OutboxMessageListItem.vue index 3b9a9e73f8..e58c39eee0 100644 --- a/src/components/OutboxMessageListItem.vue +++ b/src/components/OutboxMessageListItem.vue @@ -151,7 +151,7 @@ export default { failed: false, sendAt: (new Date().getTime() + UNDO_DELAY) / 1000, } - await this.outboxStore.sendMessage({ id: message.id, force: true }) + await this.outboxStore.updateMessage({ message, id: message.id }) try { if (this.message.status !== STATUS_IMAP_SENT_MAILBOX_FAIL) { await this.outboxStore.sendMessageWithUndo({ id: message.id }) @@ -160,6 +160,10 @@ 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() {