Skip to content

Commit 0b65e78

Browse files
committed
fix(PhishingDetection): Don't show $Phishing flag as tag to user
Signed-off-by: David Dreschner <[email protected]>
1 parent 9b15767 commit 0b65e78

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

lib/Db/Message.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
* @method bool|null getFlagJunk()
5050
* @method void setFlagNotjunk(bool $notjunk)
5151
* @method bool|null getFlagNotjunk()
52+
* @method void setFlagPhishing(bool $phishing)
5253
* @method bool|null getFlagPhishing()
5354
* @method void setStructureAnalyzed(bool $analyzed)
5455
* @method bool|null getStructureAnalyzed()

lib/Model/IMAPMessage.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,7 @@ public function toDbMessage(int $mailboxId, MailAccount $account): Message {
537537
|| in_array('junk', $flags, true)
538538
); // While this is not a standard IMAP flag, Thunderbird uses it to mark "junk"
539539
$msg->setFlagNotjunk(in_array(Horde_Imap_Client::FLAG_NOTJUNK, $flags, true) || in_array('nonjunk', $flags, true));// While this is not a standard IMAP Flag, Thunderbird uses it to mark "not junk"
540+
$msg->setFlagPhishing(in_array('$phishing', $flags, true));
540541
// @todo remove this as soon as possible @link https://github.com/nextcloud/mail/issues/25
541542
$msg->setFlagImportant(in_array('$important', $flags, true) || in_array('$labelimportant', $flags, true) || in_array(Tag::LABEL_IMPORTANT, $flags, true));
542543
$msg->setFlagAttachments(false);
@@ -555,6 +556,7 @@ public function toDbMessage(int $mailboxId, MailAccount $account): Message {
555556
'junk', // While this is not a standard IMAP flag, Thunderbird uses it to mark "junk"
556557
Horde_Imap_Client::FLAG_NOTJUNK,
557558
'nonjunk', // While this is not a standard IMAP Flag, Thunderbird uses it to mark "not junk"
559+
'$phishing', // Horde has no const for this flag yet
558560
Horde_Imap_Client::FLAG_MDNSENT,
559561
Horde_Imap_Client::FLAG_RECENT,
560562
Horde_Imap_Client::FLAG_SEEN,

0 commit comments

Comments
 (0)