diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-07-14 17:30:50 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-07-17 19:44:36 +0300 |
commit | 24d268d1073e09ac7dedd8a7c71da2c3f4e76a85 (patch) | |
tree | 77b8a0f2d12622f29eb0c51e63b7b24101222cfa /lib/Controller/MessagesController.php | |
parent | e380adfc02d1cbec1bc88c68327be713b026adbc (diff) |
Add a REST resource to fetch a thread
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Controller/MessagesController.php')
-rwxr-xr-x | lib/Controller/MessagesController.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/Controller/MessagesController.php b/lib/Controller/MessagesController.php index 7e813bbe6..ef6357835 100755 --- a/lib/Controller/MessagesController.php +++ b/lib/Controller/MessagesController.php @@ -236,6 +236,23 @@ class MessagesController extends Controller { /** * @NoAdminRequired + * @NoCSRFRequired + * @TrapError + * + * @param int $accountId + * @param string $folderId + * + * @return JSONResponse + * @throws ClientException + */ + public function getThread(int $accountId, int $id): JSONResponse { + $account = $this->accountService->find($this->currentUserId, $accountId); + + return new JSONResponse($this->mailManager->getThread($account, $id)); + } + + /** + * @NoAdminRequired * @TrapError * * @param int $accountId |