Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-07-14 17:30:50 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-07-17 19:44:36 +0300
commit24d268d1073e09ac7dedd8a7c71da2c3f4e76a85 (patch)
tree77b8a0f2d12622f29eb0c51e63b7b24101222cfa /lib/Controller/MessagesController.php
parente380adfc02d1cbec1bc88c68327be713b026adbc (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-xlib/Controller/MessagesController.php17
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