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/Model
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-08-11 22:10:49 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-08-24 21:21:40 +0300
commit9498ebac6eccde201526b9a6131a76c02ca5db62 (patch)
tree7256f1fc6de4dee185f5cc116e45247cf27f28cb /lib/Model
parent430500712496242526eed2aedb5afc42d60ca1b9 (diff)
Rework the routing
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Model')
-rw-r--r--lib/Model/IMAPMessage.php17
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/Model/IMAPMessage.php b/lib/Model/IMAPMessage.php
index 1dae7a1d0..8b7ae12a3 100644
--- a/lib/Model/IMAPMessage.php
+++ b/lib/Model/IMAPMessage.php
@@ -48,7 +48,6 @@ use OCA\Mail\Service\Html;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\Files\File;
use OCP\Files\SimpleFS\ISimpleFile;
-use function base64_encode;
use function in_array;
use function mb_convert_encoding;
@@ -422,15 +421,17 @@ class IMAPMessage implements IMessage, JsonSerializable {
}
/**
+ * @param int $id
+ *
* @return array
*/
- public function getFullMessage(int $accountId, string $mailbox, int $id): array {
+ public function getFullMessage(int $id): array {
$mailBody = $this->plainMessage;
$data = $this->jsonSerialize();
if ($this->hasHtmlMessage) {
$data['hasHtmlBody'] = true;
- $data['body'] = $this->getHtmlBody($accountId, $mailbox, $id);
+ $data['body'] = $this->getHtmlBody($id);
} else {
$mailBody = $this->htmlService->convertLinks($mailBody);
list($mailBody, $signature) = $this->htmlService->parseMailBody($mailBody);
@@ -462,17 +463,13 @@ class IMAPMessage implements IMessage, JsonSerializable {
}
/**
- * @param int $accountId
- * @param string $folderId
- * @param int $messageId
+ * @param int $id
*
* @return string
*/
- public function getHtmlBody(int $accountId, string $folderId, int $messageId): string {
+ public function getHtmlBody(int $id): string {
return $this->htmlService->sanitizeHtmlMailBody($this->htmlMessage, [
- 'accountId' => $accountId,
- 'folderId' => base64_encode($folderId),
- 'messageId' => $messageId,
+ 'id' => $id,
], function ($cid) {
$match = array_filter($this->attachments,
function ($a) use ($cid) {