diff options
author | Anna Larch <anna@nextcloud.com> | 2022-01-25 21:39:28 +0300 |
---|---|---|
committer | Anna Larch <anna@nextcloud.com> | 2022-06-14 19:41:11 +0300 |
commit | 1b965d682982b1f05d60646b58d26709639cb84b (patch) | |
tree | b99eec344332b0471f872830bed08368dc1a19ec /lib/Controller/MessagesController.php | |
parent | f1f4a287ce3b2074759ef959f42af1639ab4daa6 (diff) |
Handle empty thread root id
Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'lib/Controller/MessagesController.php')
-rwxr-xr-x | lib/Controller/MessagesController.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Controller/MessagesController.php b/lib/Controller/MessagesController.php index 0ec4bdea7..36945b46c 100755 --- a/lib/Controller/MessagesController.php +++ b/lib/Controller/MessagesController.php @@ -134,7 +134,6 @@ class MessagesController extends Controller { ITrustedSenderService $trustedSenderService, IMailTransmission $mailTransmission) { parent::__construct($appName, $request); - $this->accountService = $accountService; $this->mailManager = $mailManager; $this->mailSearch = $mailSearch; @@ -328,6 +327,10 @@ class MessagesController extends Controller { return new JSONResponse([], Http::STATUS_FORBIDDEN); } + if (empty($message->getThreadRootId())) { + return new JSONResponse([], Http::STATUS_NOT_FOUND); + } + return new JSONResponse($this->mailManager->getThread($account, $message->getThreadRootId())); } |