Skip to content

Commit

Permalink
fixup! Alter Outbox logic to handle automated messages better
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianKrupinski committed Aug 28, 2024
1 parent 02436c3 commit 1abf150
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Controller/OutboxController.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function update(
int $accountId,
string $subject,
string $body,
string $editorBody,
?string $editorBody,
bool $isHtml,
bool $smimeSign,
bool $smimeEncrypt,
Expand Down
6 changes: 5 additions & 1 deletion 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.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 })
Expand All @@ -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() {
Expand Down

0 comments on commit 1abf150

Please sign in to comment.