diff options
Diffstat (limited to 'service/pixelated/adapter/pixelated_mailbox.py')
-rw-r--r-- | service/pixelated/adapter/pixelated_mailbox.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/service/pixelated/adapter/pixelated_mailbox.py b/service/pixelated/adapter/pixelated_mailbox.py index 85d965d1..62ea57e6 100644 --- a/service/pixelated/adapter/pixelated_mailbox.py +++ b/service/pixelated/adapter/pixelated_mailbox.py @@ -54,8 +54,16 @@ class PixelatedMailbox: def add(self, mail): self.querier.create_mail(mail, self.mailbox_name) + def add_existing(self, mail_ident): + mail = self.querier.mail(mail_ident) + mail.remove_all_tags() + mail.set_mailbox(self.mailbox_name) + mail.save() + self.add_mailbox_tag_if_not_there(mail) + def remove(self, ident): mail = self.querier.mail(ident) + mail.remove_all_tags() self.querier.remove_mail(mail) @classmethod |