mark_unread method for mail room

workspace
Brendan Howell 8 years ago
parent 831d27d71e
commit 81fb54c14d

@ -180,6 +180,16 @@ class MailRoom(Bureau):
self.imapserv.delete_messages((imap_id)) self.imapserv.delete_messages((imap_id))
self.imapserv.expunge() self.imapserv.expunge()
@add_command("un", "Mark as unread")
def mark_unread(self, data):
"""
Flags an email as unseen (so you can deal with it later).
"""
shortcode, _ = data.split(".")
imap_id = self.get_imap_id(shortcode)
self._connect_imap()
self.imapserv.remove_flags(imap_id, [imapclient.SEEN])
@add_command("re", "Reply with scan") @add_command("re", "Reply with scan")
def reply_scan(self, data): def reply_scan(self, data):
""" """

Loading…
Cancel
Save