diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 17:07:20 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 17:21:33 +0300 |
commit | 2da6472563f6cb2226dc5ce053f11f1bbcdb7d10 (patch) | |
tree | 04e4706835e861b7f53439bb180b443c4cef8d22 /lib/IMAP | |
parent | 5beabd985681ed6c9bb58c874d8fa8516fbdfe92 (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.php | 16 |
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 |