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/IMAP
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 17:07:20 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 17:21:33 +0300
commit2da6472563f6cb2226dc5ce053f11f1bbcdb7d10 (patch)
tree04e4706835e861b7f53439bb180b443c4cef8d22 /lib/IMAP
parent5beabd985681ed6c9bb58c874d8fa8516fbdfe92 (diff)
Refactor message flag logic into a service method
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/IMAP')
-rw-r--r--lib/IMAP/MessageMapper.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/IMAP/MessageMapper.php b/lib/IMAP/MessageMapper.php
index ee1880324..4e32aa0c4 100644
--- a/lib/IMAP/MessageMapper.php
+++ b/lib/IMAP/MessageMapper.php
@@ -260,6 +260,22 @@ class MessageMapper {
}
/**
+ * @throws Horde_Imap_Client_Exception
+ */
+ public function removeFlag(Horde_Imap_Client_Socket $client,
+ Mailbox $mailbox,
+ int $uid,
+ string $flag): void {
+ $client->store(
+ $mailbox->getName(),
+ [
+ 'ids' => new Horde_Imap_Client_Ids($uid),
+ 'remove' => [$flag],
+ ]
+ );
+ }
+
+ /**
* @param Horde_Imap_Client_Socket $client
* @param string $mailbox
* @param int $id