diff --git a/lib/Controller/ThreadController.php b/lib/Controller/ThreadController.php index fd06e20168..aa45c4e3ef 100755 --- a/lib/Controller/ThreadController.php +++ b/lib/Controller/ThreadController.php @@ -125,7 +125,7 @@ public function delete(int $id): JSONResponse { /** * @NoAdminRequired * - * @param int $id + * @param string $id * @param int $accountId * * @return JSONResponse @@ -134,7 +134,7 @@ public function summarize(string $id, int $accountId): JSONResponse { try { $account = $this->accountService->find($this->currentUserId, $accountId); $messages = $this->mailManager->getThread($account, $id); - } catch (DoesNotExistException $e) { + } catch (ClientException $e) { return new JSONResponse([], Http::STATUS_FORBIDDEN); } @@ -151,7 +151,7 @@ public function summarize(string $id, int $accountId): JSONResponse { return new JSONResponse([], Http::STATUS_NO_CONTENT); } - return new JSONResponse($summary); + return new JSONResponse([$summary]); } }