From 03700e730355c941a582f6d4e1459da57fdb44a3 Mon Sep 17 00:00:00 2001 From: hamza221 Date: Tue, 1 Aug 2023 18:10:51 +0200 Subject: [PATCH] fixup! add thread summary ui Signed-off-by: hamza221 --- lib/Controller/ThreadController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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]); } }