summaryrefslogtreecommitdiff
path: root/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
commit5f08775a4aace0859d4ad2539b07ad612fec4b7b (patch)
tree4b1a129092d64d3f38ee602206e0aaa6b784a85e /src/leap
parent253ff4a9c236e35587978e40531021c0f824756b (diff)
fix adding msg with empty flags
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/mail/imap/server.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/leap/mail/imap/server.py b/src/leap/mail/imap/server.py
index abe1dfa..733944c 100644
--- a/src/leap/mail/imap/server.py
+++ b/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: