diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php index ec70f5517..8dfb65e85 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php @@ -433,14 +433,14 @@ class ImapClient extends \MailSo\Net\NetClient if ($oFolderInfo && $sFolderName === $oFolderInfo->FolderName) { $aResult = $oFolderInfo->getStatusItems(); // SELECT or EXAMINE command then UNSEEN is the message sequence number of the first unseen message - // However, Dovecot does return the amount of unseen messages -// $aResult['UNSEEN'] = $this->simpleESearchOrESortHelper(false, 'UNSEEN', ['COUNT'])['COUNT']; - return $aResult; + $aResult['UNSEEN'] = $this->simpleESearchOrESortHelper(false, 'UNSEEN', ['COUNT'])['COUNT']; + } else { + $aResult = \count($aStatusItems) + ? $this->SendRequestGetResponse('STATUS', array($this->EscapeString($sFolderName), $aStatusItems)) + ->getStatusFolderInformationResult() + : null; } - return \count($aStatusItems) - ? $this->SendRequestGetResponse('STATUS', array($this->EscapeString($sFolderName), $aStatusItems)) - ->getStatusFolderInformationResult() - : null; + return $aResult; } /** diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Traits/Status.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Traits/Status.php index 11927d98c..d517b474b 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Traits/Status.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Traits/Status.php @@ -56,7 +56,6 @@ trait Status * The number of messages which do not have the \Seen flag set. * This response also occurs as a result of a SELECT or EXAMINE command, * but then it is the message sequence number of the first unseen message. - * However, Dovecot does return the amount of unseen messages * @var int */ $UNSEEN,