diff options
author | Jefferson Stachelski <jstachel@thoughtworks.com> | 2015-05-05 17:51:48 -0300 |
---|---|---|
committer | Jefferson Stachelski <jstachel@thoughtworks.com> | 2015-05-05 17:51:48 -0300 |
commit | cfcfae95d30ca8e40fe1c4ce5afc4b6d209ef358 (patch) | |
tree | 564b18ab1cb297cfcb78e05126c603b031e79c45 /service | |
parent | ebafb1199cb67bc5f4e1c2111473c6550a2ffa2d (diff) |
#337 Added preload mails to DRAFTS
Diffstat (limited to 'service')
-rw-r--r-- | service/pixelated/maintenance.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/service/pixelated/maintenance.py b/service/pixelated/maintenance.py index 888c5b8d..4597d306 100644 --- a/service/pixelated/maintenance.py +++ b/service/pixelated/maintenance.py @@ -159,6 +159,7 @@ def add_mail_folder(account, maildir, folder_name, deferreds): if 'R' in mail.get_flags(): flags = (WithMsgFields.ANSWERED_FLAG,) + flags + mail.set_payload(mail.get_payload() + '\n' + folder_name) deferreds.append(mbx.addMessage(mail.as_string(), flags=flags, notify_on_disk=False)) @@ -172,6 +173,7 @@ def load_mails(args, mail_paths): for path in mail_paths: maildir = Maildir(path, factory=None) add_mail_folder(account, maildir, 'INBOX', deferreds) + add_mail_folder(account, maildir, 'DRAFTS', deferreds) for mail_folder_name in maildir.list_folders(): mail_folder = maildir.get_folder(mail_folder_name) add_mail_folder(account, mail_folder, mail_folder_name, deferreds) |