diff options
author | Kali Kaneko <kali@leap.se> | 2014-02-20 17:07:58 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2014-02-20 17:07:58 -0400 |
commit | bd476d7ba97a479db14a9b72b8b52ef5997d98f6 (patch) | |
tree | 634a58e84cc68e87a39a35a28f01ae050e1b2d82 /src/leap/mail/imap/mailbox.py | |
parent | a25e73b402d73eea03a7bf34c863a98577c78ace (diff) |
Fix regression on "duplicate drafts" issue.
Not a permanent solution, but it looks for fdoc matching a given
msgid to avoid duplication of drafts in thunderbird folders.
Diffstat (limited to 'src/leap/mail/imap/mailbox.py')
-rw-r--r-- | src/leap/mail/imap/mailbox.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/leap/mail/imap/mailbox.py b/src/leap/mail/imap/mailbox.py index 59b2b40..947cf1b 100644 --- a/src/leap/mail/imap/mailbox.py +++ b/src/leap/mail/imap/mailbox.py @@ -354,7 +354,8 @@ class SoledadMailbox(WithMsgFields, MBoxParser): :rtype: int """ msg = self.messages.get_msg_by_uid(message) - return msg.getUID() + if msg is not None: + return msg.getUID() def getUIDNext(self): """ @@ -854,6 +855,7 @@ class SoledadMailbox(WithMsgFields, MBoxParser): if len(query) > 2: if query[1] == 'HEADER' and query[2].lower() == "message-id": msgid = str(query[3]).strip() + logger.debug("Searching for %s" % (msgid,)) d = self.messages._get_uid_from_msgid(str(msgid)) d1 = defer.gatherResults([d]) # we want a list, so return it all the same |