summaryrefslogtreecommitdiff
path: root/mail/src/leap
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-11-26 16:50:10 -0200
committerKali Kaneko <kali@leap.se>2013-11-26 17:20:53 -0200
commit61e84cee60ef1490ddf3bd82eec1d20e8e294ceb (patch)
tree90d9c4853d59d801f42eeb64301dae0a45b9a7fa /mail/src/leap
parentb10d7a72cb96df2d563d90ab1811e24aa2fa84ab (diff)
fix adding msg with empty flags
Diffstat (limited to 'mail/src/leap')
-rw-r--r--mail/src/leap/mail/imap/server.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mail/src/leap/mail/imap/server.py b/mail/src/leap/mail/imap/server.py
index abe1dfa2..733944c6 100644
--- a/mail/src/leap/mail/imap/server.py
+++ b/mail/src/leap/mail/imap/server.py
@@ -1438,12 +1438,14 @@ class SoledadMailbox(WithMsgFields):
"""
# XXX we should treat the message as an IMessage from here
uid_next = self.getUIDNext()
- flags = tuple(str(flag) for flag in flags)
+ if flags is None:
+ flags = tuple()
+ else:
+ flags = tuple(str(flag) for flag in flags)
self.messages.add_msg(message, flags=flags, date=date,
uid=uid_next)
- # XXX recent should not include deleted...??
exists = len(self.messages)
recent = len(self.messages.get_recent())
for listener in self.listeners: