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
path: root/lib
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2018-09-24 09:16:38 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2018-09-24 09:16:38 +0300
commit1b906b18122a145c6ad331270b4b0185597cfa4c (patch)
treed4cac9fa0b80e48a4c99b8efc48bf3c595eef770 /lib
parent1d0b9fe01479de6bd19c276b09d7e4f3f1dd632c (diff)
Load real message body data from the server
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Controller/MessagesController.php32
1 files changed, 1 insertions, 31 deletions
diff --git a/lib/Controller/MessagesController.php b/lib/Controller/MessagesController.php
index 57d1ad0cc..989c93856 100755
--- a/lib/Controller/MessagesController.php
+++ b/lib/Controller/MessagesController.php
@@ -148,17 +148,7 @@ class MessagesController extends Controller {
/* @var $message IMAPMessage */
$message = $mailBox->getMessage($id);
- $json = $this->enhanceMessage($accountId, $folderId, $id, $message, $mailBox);
-
- // Unified inbox hack
- // TODO: evalue whether this is still in use on the client side
- $messageId = $id;
- $json['messageId'] = $messageId;
- $json['accountId'] = $accountId;
- $json['folderId'] = $folderId;
- // End unified inbox hack
-
- return $json;
+ return $this->enhanceMessage($accountId, $folderId, $id, $message, $mailBox);
}
/**
@@ -433,22 +423,6 @@ class MessagesController extends Controller {
/**
* @param int $accountId
* @param string $folderId
- * @param int $messageId
- * @return string
- */
- private function buildHtmlBodyUrl(int $accountId, string $folderId, int $messageId): string {
- $htmlBodyUrl = $this->urlGenerator->linkToRoute('mail.messages.getHtmlBody',
- [
- 'accountId' => $accountId,
- 'folderId' => $folderId,
- 'messageId' => $messageId,
- ]);
- return $this->urlGenerator->getAbsoluteURL($htmlBodyUrl);
- }
-
- /**
- * @param int $accountId
- * @param string $folderId
* @param int $id
* @param IMAPMessage $m
* @param IMailBox $mailBox
@@ -458,10 +432,6 @@ class MessagesController extends Controller {
IMailBox $mailBox): array {
$json = $m->getFullMessage($mailBox->getSpecialRole());
- if (isset($json['hasHtmlBody'])) {
- $json['htmlBodyUrl'] = $this->buildHtmlBodyUrl($accountId, $folderId, $id);
- }
-
if (isset($json['attachments'])) {
$json['attachments'] = array_map(function ($a) use ($accountId, $folderId, $id) {
return $this->enrichDownloadUrl($accountId, $folderId, $id, $a);