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-02-01 19:06:56 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2018-02-01 19:06:56 +0300
commite138bd85aeeaa662cd6af41e4e4515f69a90b44f (patch)
tree6f3373e17f50c3ee99aff1a6703c7af832a88c05 /lib/Controller/MessagesController.php
parent5d6323a0a8b53323518273a1605f4552570383c8 (diff)
Remove unified inbox/mailbox relicts
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Controller/MessagesController.php')
-rwxr-xr-xlib/Controller/MessagesController.php15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/Controller/MessagesController.php b/lib/Controller/MessagesController.php
index 6f24dec65..c32f75c71 100755
--- a/lib/Controller/MessagesController.php
+++ b/lib/Controller/MessagesController.php
@@ -28,15 +28,14 @@
namespace OCA\Mail\Controller;
+use OCA\Mail\Account;
use OCA\Mail\Exception\ServiceException;
use OCA\Mail\Http\AttachmentDownloadResponse;
use OCA\Mail\Http\HtmlResponse;
use OCA\Mail\Model\IMAPMessage;
use OCA\Mail\Service\AccountService;
-use OCA\Mail\Service\IAccount;
use OCA\Mail\Service\IMailBox;
use OCA\Mail\Service\Logger;
-use OCA\Mail\Service\UnifiedAccount;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Http;
@@ -72,7 +71,7 @@ class MessagesController extends Controller {
/** @var IURLGenerator */
private $urlGenerator;
- /** @var IAccount[] */
+ /** @var Account[] */
private $accounts = [];
/**
@@ -153,14 +152,8 @@ class MessagesController extends Controller {
$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;
- if ($accountId === UnifiedAccount::ID) {
- // Add accountId, folderId for unified inbox replies
- list($accountId, $messageId) = json_decode(base64_decode($id));
- $account = $this->getAccount($accountId);
- $inbox = $account->getInbox();
- $folderId = base64_encode($inbox->getFolderId());
- }
$json['messageId'] = $messageId;
$json['accountId'] = $accountId;
$json['folderId'] = $folderId;
@@ -366,7 +359,7 @@ class MessagesController extends Controller {
/**
* @param int $accountId
- * @return IAccount
+ * @return Account
*/
private function getAccount($accountId) {
if (!array_key_exists($accountId, $this->accounts)) {