diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-08-03 11:17:32 +0200 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-08-11 17:00:31 +0200 |
commit | 07df4eb5751d78189e60654a1b593bc8c7637521 (patch) | |
tree | 778f9ee32c855123abea1cddd78b06695f3ae32a /service/pixelated | |
parent | 38d810d338ce671b6389cd47d665b87798bcd65c (diff) |
Added move message in new data model.
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/adapter/mailstore/leap_mailstore.py | 7 | ||||
-rw-r--r-- | service/pixelated/adapter/mailstore/mailstore.py | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/service/pixelated/adapter/mailstore/leap_mailstore.py b/service/pixelated/adapter/mailstore/leap_mailstore.py index c1e9f0d8..87bfea04 100644 --- a/service/pixelated/adapter/mailstore/leap_mailstore.py +++ b/service/pixelated/adapter/mailstore/leap_mailstore.py @@ -126,7 +126,6 @@ class LeapMailStore(MailStore): def copy_mail_to_mailbox(self, mail_id, mailbox_name): message = yield self._fetch_msg_from_soledad(mail_id, load_body=True) mailbox = yield self._get_or_create_mailbox(mailbox_name) - copy_wrapper = yield message.get_wrapper().copy(self.soledad, mailbox.uuid) leap_message = Message(copy_wrapper) @@ -135,6 +134,12 @@ class LeapMailStore(MailStore): defer.returnValue(mail) + @defer.inlineCallbacks + def move_mail_to_mailbox(self, mail_id, mailbox_name): + mail_copy = yield self.copy_mail_to_mailbox(mail_id, mailbox_name) + yield self.delete_mail(mail_id) + defer.returnValue(mail_copy) + def _update_mail(self, message): return message.get_wrapper().update(self.soledad) diff --git a/service/pixelated/adapter/mailstore/mailstore.py b/service/pixelated/adapter/mailstore/mailstore.py index 29d4fe67..425def92 100644 --- a/service/pixelated/adapter/mailstore/mailstore.py +++ b/service/pixelated/adapter/mailstore/mailstore.py @@ -49,6 +49,9 @@ class MailStore(object): def copy_mail_to_mailbox(self, mail_id, mailbox_name): pass + def move_mail_to_mailbox(self, mail_id, mailbox_name): + pass + def underscore_uuid(uuid): return uuid.replace('-', '_') |