mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-24 23:08:08 +08:00
Bugfix: message flags/keywords are 'atom' and should be Utf7 modified
This commit is contained in:
parent
3fc781c1c1
commit
e8b73b4943
4 changed files with 6 additions and 4 deletions
|
@ -333,7 +333,7 @@ trait Folders
|
|||
$key = $oResponse->OptionalResponse[0];
|
||||
if (\count($oResponse->OptionalResponse) > 1) {
|
||||
if ('PERMANENTFLAGS' === $key && \is_array($oResponse->OptionalResponse[1])) {
|
||||
$oResult->PermanentFlags = $oResponse->OptionalResponse[1];
|
||||
$oResult->PermanentFlags = \array_map('\\MailSo\\Base\\Utils::Utf7ModifiedToUtf8', $oResponse->OptionalResponse[1]);
|
||||
}
|
||||
} else if ('READ-ONLY' === $key) {
|
||||
// $oResult->IsWritable = false;
|
||||
|
@ -348,7 +348,7 @@ trait Folders
|
|||
else if (\count($oResponse->ResponseList) > 2
|
||||
&& 'FLAGS' === $oResponse->ResponseList[1]
|
||||
&& \is_array($oResponse->ResponseList[2])) {
|
||||
$oResult->Flags = $oResponse->ResponseList[2];
|
||||
$oResult->Flags = \array_map('\\MailSo\\Base\\Utils::Utf7ModifiedToUtf8', $oResponse->ResponseList[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -279,6 +279,8 @@ trait Messages
|
|||
* $sStoreAction[] = (UNCHANGEDSINCE $modsequence)
|
||||
*/
|
||||
|
||||
$aInputStoreItems = \array_map('\\MailSo\\Base\\Utils::Utf8ToUtf7Modified', $aInputStoreItems);
|
||||
|
||||
return $this->SendRequestGetResponse(
|
||||
$oRange->UID ? 'UID STORE' : 'STORE',
|
||||
array((string) $oRange, $sStoreAction, $aInputStoreItems)
|
||||
|
|
|
@ -535,7 +535,7 @@ class MailClient
|
|||
|
||||
foreach ($aFetchResponse as $oFetchResponse) {
|
||||
$iUid = (int) $oFetchResponse->GetFetchValue(FetchType::UID);
|
||||
$aLowerFlags = \array_map('strtolower', $oFetchResponse->GetFetchValue(FetchType::FLAGS));
|
||||
$aLowerFlags = \array_map('mb_strtolower', \array_map('\\MailSo\\Base\\Utils::Utf7ModifiedToUtf8', $oFetchResponse->GetFetchValue(FetchType::FLAGS)));
|
||||
$aFlags[] = array(
|
||||
'Uid' => $iUid,
|
||||
'Flags' => $aLowerFlags
|
||||
|
|
|
@ -293,7 +293,7 @@ class Message implements \JsonSerializable
|
|||
$oMessage->sFolder = $sFolder;
|
||||
$oMessage->iUid = (int) $oFetchResponse->GetFetchValue(FetchType::UID);
|
||||
$oMessage->iSize = (int) $oFetchResponse->GetFetchValue(FetchType::RFC822_SIZE);
|
||||
$oMessage->aFlagsLowerCase = \array_map('strtolower', $aFlags ?: []);
|
||||
$oMessage->aFlagsLowerCase = \array_map('mb_strtolower', \array_map('\\MailSo\\Base\\Utils::Utf7ModifiedToUtf8', $aFlags ?: []));
|
||||
|
||||
$oMessage->iInternalTimeStampInUTC =
|
||||
\MailSo\Base\DateTimeHelper::ParseInternalDateString($sInternalDate);
|
||||
|
|
Loading…
Reference in a new issue