diff options
author | Kali Kaneko <kali@leap.se> | 2015-02-26 13:10:18 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-03-03 14:27:03 -0400 |
commit | 63a252fb5dadb8b57212ea6d5e09737ea22d470f (patch) | |
tree | 909ec2eb1e8bc9ccce9e705a8377bb984ab1ac9c /src/leap/mail/mail.py | |
parent | f6375e6bed217974369d77b7ff7191c3cb9fbb24 (diff) |
fix rename_mailbox implementation, make test pass
Diffstat (limited to 'src/leap/mail/mail.py')
-rw-r--r-- | src/leap/mail/mail.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/leap/mail/mail.py b/src/leap/mail/mail.py index 37ab829..9906ddf 100644 --- a/src/leap/mail/mail.py +++ b/src/leap/mail/mail.py @@ -816,16 +816,12 @@ class Account(object): return d def rename_mailbox(self, oldname, newname): - # TODO incomplete/wrong!!! - # Should rename also ALL of the document ids that are pointing - # to the old mailbox!!! - - # TODO part-docs identifiers should have the UID_validity of the - # mailbox embedded, instead of the name! (so they can survive a rename) def _rename_mbox(wrapper): wrapper.mbox = newname - return wrapper, wrapper.update(self.store) + d = wrapper.update(self.store) + d.addCallback(lambda result: wrapper) + return d d = self.adaptor.get_or_create_mbox(self.store, oldname) d.addCallback(_rename_mbox) |