Merge pull request #5206 from nextcloud/fix/tags-do-not-have-$
Tags do not have $
This commit is contained in:
Коммит
bf72159528
|
@ -789,7 +789,7 @@ class IMAPMessage implements IMessage, JsonSerializable {
|
|||
$keyword = Tag::LABEL_LATER;
|
||||
}
|
||||
|
||||
$displayName = str_replace('_', ' ', $keyword);
|
||||
$displayName = str_replace(['_', '$'], [' ', ''], $keyword);
|
||||
$displayName = strtoupper($displayName);
|
||||
$displayName = mb_convert_encoding($displayName, 'UTF-8', 'UTF7-IMAP');
|
||||
$displayName = strtolower($displayName);
|
||||
|
|
|
@ -623,7 +623,7 @@ class MailManager implements IMailManager {
|
|||
if ($imapLabel === false) {
|
||||
throw new ClientException('Error converting display name to UTF7-IMAP ', 0);
|
||||
}
|
||||
$imapLabel = mb_strcut($imapLabel, 0, 64);
|
||||
$imapLabel = '$' . strtolower(mb_strcut($imapLabel, 0, 63));
|
||||
|
||||
try {
|
||||
return $this->getTagByImapLabel($imapLabel, $userId);
|
||||
|
|
|
@ -576,7 +576,7 @@ class MailManagerTest extends TestCase {
|
|||
|
||||
self::assertEquals('admin', $tag->getUserId());
|
||||
self::assertEquals('Hello Hello 👋', $tag->getDisplayName());
|
||||
self::assertEquals('Hello_Hello_&2D3cSw-', $tag->getImapLabel());
|
||||
self::assertEquals('$hello_hello_&2d3csw-', $tag->getImapLabel());
|
||||
self::assertEquals('#0082c9', $tag->getColor());
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче