Skip to content

fix(composer): handle missing message body gracefully #12323

Merged
kesselb merged 1 commit intomainfrom
handle-missing-message-body
Feb 5, 2026
Merged

fix(composer): handle missing message body gracefully #12323
kesselb merged 1 commit intomainfrom
handle-missing-message-body

Conversation

@kesselb
Copy link
Copy Markdown
Contributor

@kesselb kesselb commented Jan 27, 2026

For #12320

How to test

Index: lib/Controller/MessagesController.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/Controller/MessagesController.php b/lib/Controller/MessagesController.php
--- a/lib/Controller/MessagesController.php	(revision 45cdf0a8e9e5c08e69454c207d8845b86ca59223)
+++ b/lib/Controller/MessagesController.php	(date 1769552067333)
@@ -574,7 +574,7 @@
 	public function getHtmlBody(int $id, bool $plain = false): Response {
 		try {
 			try {
-				$message = $this->mailManager->getMessage($this->currentUserId, $id);
+				$message = $this->mailManager->getMessage($this->currentUserId, PHP_INT_MIN);
 				$mailbox = $this->mailManager->getMailbox($this->currentUserId, $message->getMailboxId());
 				$account = $this->accountService->find($this->currentUserId, $mailbox->getAccountId());
 			} catch (DoesNotExistException) {

Render template without skeleton

  • Open Inbox
  • Pick any message with an html body
B A
Screenshot From 2026-01-27 23-16-47 Screenshot From 2026-01-27 23-16-05

I'm aware the font looks off, and no, I'm not going to fix that 🤣

Handle missing body

  • Open Drafts
  • Click on an existing draft
B A
Screenshot From 2026-01-27 23-21-12 Screenshot From 2026-01-27 23-22-55

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb kesselb force-pushed the handle-missing-message-body branch from 45cdf0a to 1d40201 Compare February 4, 2026 11:14
@kesselb kesselb marked this pull request as ready for review February 4, 2026 11:14
@kesselb kesselb merged commit a5f6562 into main Feb 5, 2026
56 of 60 checks passed
@kesselb kesselb deleted the handle-missing-message-body branch February 5, 2026 18:44
@kesselb
Copy link
Copy Markdown
Contributor Author

kesselb commented Feb 5, 2026

/backport to stable5.7

@kesselb
Copy link
Copy Markdown
Contributor Author

kesselb commented Feb 5, 2026

/backport to stable5.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants