summaryrefslogtreecommitdiff
path: root/service/pixelated/adapter
diff options
context:
space:
mode:
Diffstat (limited to 'service/pixelated/adapter')
-rw-r--r--service/pixelated/adapter/services/mailboxes.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/service/pixelated/adapter/services/mailboxes.py b/service/pixelated/adapter/services/mailboxes.py
index 4d90f0c6..d458406b 100644
--- a/service/pixelated/adapter/services/mailboxes.py
+++ b/service/pixelated/adapter/services/mailboxes.py
@@ -72,11 +72,13 @@ class Mailboxes(object):
def move_to_inbox(self, mail_id):
return self._move_to(mail_id, self.inbox)
+ @defer.inlineCallbacks
def _move_to(self, mail_id, mailbox):
+ mailbox = yield mailbox
mail = self.querier.mail(mail_id)
mail.set_mailbox(mailbox.mailbox_name)
mail.save()
- return mail
+ defer.returnValue(mail)
def mail(self, mail_id):
return self.querier.mail(mail_id)