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() {