diff options
author | Bruno Wagner <bwgpro@gmail.com> | 2015-06-05 19:36:08 -0300 |
---|---|---|
committer | Bruno Wagner <bwgpro@gmail.com> | 2015-06-05 19:36:08 -0300 |
commit | 103cb481bc46e9dc8c5ca047b460265b5d68ee32 (patch) | |
tree | acb7cf1395b879fcd9730766498415fce58d137f /service/pixelated/adapter/services/draft_service.py | |
parent | a2886f31583722c5f08a965325156f8eb1e18509 (diff) |
Added creation of input mail from python message
That way we don't need extra logic for the welcome
mail, we just have to read the file and send the contents
to the input mail parser and that's it.
Also moved the logic of adding a welcome mail to the mailboxes
because it has knowledge of mailbox methods anyways.
Diffstat (limited to 'service/pixelated/adapter/services/draft_service.py')
-rw-r--r-- | service/pixelated/adapter/services/draft_service.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/service/pixelated/adapter/services/draft_service.py b/service/pixelated/adapter/services/draft_service.py index df295eec..c8df0a05 100644 --- a/service/pixelated/adapter/services/draft_service.py +++ b/service/pixelated/adapter/services/draft_service.py @@ -22,13 +22,10 @@ class DraftService(object): self._mailboxes = mailboxes def create_draft(self, input_mail): - pixelated_mail = self._drafts().add(input_mail) + pixelated_mail = self._mailboxes.drafts.add(input_mail) return pixelated_mail def update_draft(self, ident, input_mail): pixelated_mail = self.create_draft(input_mail) - self._drafts().remove(ident) + self._mailboxes.drafts.remove(ident) return pixelated_mail - - def _drafts(self): - return self._mailboxes.drafts() |