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
path: root/lib/Model
diff options
context:
space:
mode:
authorGretaD <gretadoci@gmail.com>2020-05-06 16:03:18 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-05-12 14:54:55 +0300
commit85577232d3cbbced45461892cfec925017b7006c (patch)
treec8560fa529660f3b2311a600073fe182f139a764 /lib/Model
parent7f1e09adb087ffa825de76d8c2c1dd0f74ffaf88 (diff)
Add mark as junk
Signed-off-by: GretaD <gretadoci@gmail.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Model')
-rw-r--r--lib/Model/IMAPMessage.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Model/IMAPMessage.php b/lib/Model/IMAPMessage.php
index 3e055f2cc..37f264f05 100644
--- a/lib/Model/IMAPMessage.php
+++ b/lib/Model/IMAPMessage.php
@@ -48,6 +48,7 @@ use OCP\AppFramework\Db\DoesNotExistException;
use OCP\Files\File;
use OCP\Files\SimpleFS\ISimpleFile;
use function base64_encode;
+use function in_array;
use function mb_convert_encoding;
class IMAPMessage implements IMessage, JsonSerializable {
@@ -644,7 +645,10 @@ class IMAPMessage implements IMessage, JsonSerializable {
$msg->setFlagFlagged(in_array(Horde_Imap_Client::FLAG_FLAGGED, $flags, true));
$msg->setFlagSeen(in_array(Horde_Imap_Client::FLAG_SEEN, $flags, true));
$msg->setFlagForwarded(in_array(Horde_Imap_Client::FLAG_FORWARDED, $flags, true));
- $msg->setFlagJunk(in_array(Horde_Imap_Client::FLAG_JUNK, $flags, true));
+ $msg->setFlagJunk(
+ in_array(Horde_Imap_Client::FLAG_JUNK, $flags, true) ||
+ in_array('junk', $flags, true)
+ );
$msg->setFlagNotjunk(in_array(Horde_Imap_Client::FLAG_NOTJUNK, $flags, true));
$msg->setFlagImportant(false);
$msg->setFlagAttachments(false);