summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rw-r--r--service/pixelated/adapter/mail_service.py1
-rw-r--r--service/pixelated/adapter/pixelated_mail.py7
2 files changed, 5 insertions, 3 deletions
diff --git a/service/pixelated/adapter/mail_service.py b/service/pixelated/adapter/mail_service.py
index 5f651187..6239f2d9 100644
--- a/service/pixelated/adapter/mail_service.py
+++ b/service/pixelated/adapter/mail_service.py
@@ -43,6 +43,7 @@ class MailService:
return new_tags
def mail(self, mail_id):
+ import pdb;pdb.set_trace()
return self.mailboxes.mail(mail_id)
def send(self, mail):
diff --git a/service/pixelated/adapter/pixelated_mail.py b/service/pixelated/adapter/pixelated_mail.py
index 92b55ad4..f6e02882 100644
--- a/service/pixelated/adapter/pixelated_mail.py
+++ b/service/pixelated/adapter/pixelated_mail.py
@@ -27,11 +27,9 @@ class PixelatedMail:
def __init__(self):
self.body = ''
self.headers = {}
- self.ident = None
self.status = []
self.security_casing = {}
self.tags = []
- self.ident = None
@staticmethod
def from_leap_mail(leap_mail, leap_mailbox=None):
@@ -80,7 +78,10 @@ class PixelatedMail:
return temporary_headers
def _extract_tags(self):
- return set(json.loads(self.headers.get('x-tags', '[]')))
+ tags = self.headers.get('x-tags', '[]')
+ if type(tags) is list:
+ return set(tags)
+ return set(json.loads(tags))
def update_tags(self, tags):
old_tags = self.tags