diff options
author | Kali Kaneko <kali@leap.se> | 2015-01-26 23:41:52 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-02-11 14:05:44 -0400 |
commit | ad113e53d59213a5accc4f71564fd6ad0f73f74f (patch) | |
tree | c22bc9dfc375a8a9d23c33caa9f1fe73ba50cbfd /src/leap/mail/imap/mailbox.py | |
parent | 59f7005a05e50700f4d8f1fba4b036318fa246e6 (diff) |
save drafts: search by msg-id
Diffstat (limited to 'src/leap/mail/imap/mailbox.py')
-rw-r--r-- | src/leap/mail/imap/mailbox.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/leap/mail/imap/mailbox.py b/src/leap/mail/imap/mailbox.py index c826e86..be7f70c 100644 --- a/src/leap/mail/imap/mailbox.py +++ b/src/leap/mail/imap/mailbox.py @@ -842,18 +842,17 @@ class IMAPMailbox(object): # '52D44F11.9060107@dev.bitmask.net'] # TODO hardcoding for now! -- we'll support generic queries later on - # but doing a quickfix for avoiding duplicat saves in the draft folder. - # See issue #4209 + # but doing a quickfix for avoiding duplicate saves in the draft + # folder. # See issue #4209 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)) - # XXX remove gatherResults - d1 = defer.gatherResults([d]) - # we want a list, so return it all the same - return d1 + + d = self.collection.get_uid_from_msgid(str(msgid)) + d.addCallback(lambda result: [result]) + return d # nothing implemented for any other query logger.warning("Cannot process query: %s" % (query,)) |