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>2018-01-08 12:30:52 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2018-01-08 12:33:02 +0300
commitc849c1b65c458213af9f90cc4a4be1178202e1b0 (patch)
tree899fde7592131674080c1671712c262b9d1f69e1 /lib/Controller/MessagesController.php
parenta966ecbfa9bd1ea672c4af66517a38804f81bc65 (diff)
Fix recipients rending of sent messages
* Remove hacky server-side label mangling * Detect sent folder on the client-side * Append '& others' in case there is more than one recipient 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, 0 insertions, 17 deletions
diff --git a/lib/Controller/MessagesController.php b/lib/Controller/MessagesController.php
index 00de8e2a2..bb64121fb 100755
--- a/lib/Controller/MessagesController.php
+++ b/lib/Controller/MessagesController.php
@@ -33,7 +33,6 @@ use OCA\Mail\Http\AttachmentDownloadResponse;
use OCA\Mail\Http\HtmlResponse;
use OCA\Mail\Model\IMAPMessage;
use OCA\Mail\Service\AccountService;
-use OCA\Mail\Service\ContactsIntegration;
use OCA\Mail\Service\IAccount;
use OCA\Mail\Service\IMailBox;
use OCA\Mail\Service\Logger;
@@ -59,9 +58,6 @@ class MessagesController extends Controller {
/** @var string */
private $currentUserId;
- /** @var ContactsIntegration */
- private $contactsIntegration;
-
/** @var Logger */
private $logger;
@@ -86,7 +82,6 @@ class MessagesController extends Controller {
* @param AccountService $accountService
* @param string $UserId
* @param $userFolder
- * @param ContactsIntegration $contactsIntegration
* @param Logger $logger
* @param IL10N $l10n
* @param IMimeTypeDetector $mimeTypeDetector
@@ -97,7 +92,6 @@ class MessagesController extends Controller {
AccountService $accountService,
$UserId,
$userFolder,
- ContactsIntegration $contactsIntegration,
Logger $logger,
IL10N $l10n,
IMimeTypeDetector $mimeTypeDetector,
@@ -106,7 +100,6 @@ class MessagesController extends Controller {
$this->accountService = $accountService;
$this->currentUserId = $UserId;
$this->userFolder = $userFolder;
- $this->contactsIntegration = $contactsIntegration;
$this->logger = $logger;
$this->l10n = $l10n;
$this->mimeTypeDetector = $mimeTypeDetector;
@@ -138,20 +131,10 @@ class MessagesController extends Controller {
}
$messages = $mailBox->getMessages($filter, $cursor);
- $ci = $this->contactsIntegration;
$json = array_map(function($j) use ($ci, $mailBox) {
if ($mailBox->getSpecialRole() === 'trash') {
$j['delete'] = (string)$this->l10n->t('Delete permanently');
}
-
- // This is hacky and should be done on the client-side
- if ($mailBox->getSpecialRole() === 'sent') {
- $j['from'] = $j['to'];
- if((count($j['to']) > 1) || (count($j['cc']) > 0)) {
- $j['from'] .= ' ' . $this->l10n->t('& others');
- }
- }
-
return $j;
}, $messages);