From f5cf17f34227f8fe391d769f3cb33aad6de5172e Mon Sep 17 00:00:00 2001 From: Tulio Casagrande Date: Thu, 16 Jun 2016 16:37:01 -0300 Subject: Stops filtering application/pgp-keys attachments See: #608 --- service/pixelated/adapter/mailstore/leap_mailstore.py | 7 ------- 1 file changed, 7 deletions(-) (limited to 'service/pixelated/adapter/mailstore/leap_mailstore.py') diff --git a/service/pixelated/adapter/mailstore/leap_mailstore.py b/service/pixelated/adapter/mailstore/leap_mailstore.py index 9699f134..70b53c37 100644 --- a/service/pixelated/adapter/mailstore/leap_mailstore.py +++ b/service/pixelated/adapter/mailstore/leap_mailstore.py @@ -29,9 +29,6 @@ from pixelated.support.functional import to_unicode from pixelated.support import date -MIME_PGP_KEY = 'application/pgp-keys' - - class AttachmentInfo(object): def __init__(self, ident, name, encoding=None, ctype='application/octet-stream', size=0): self.ident = ident @@ -323,14 +320,10 @@ class LeapMailStore(MailStore): mbox_uuid = message.get_wrapper().fdoc.mbox_uuid mbox_name = yield self._mailbox_name_from_uuid(mbox_uuid) attachments = self._extract_attachment_info_from(message) - attachments = self._filter_public_keys_from_attachments(attachments) mail = LeapMail(mail_id, mbox_name, message.get_wrapper().hdoc.headers, set(message.get_tags()), set(message.get_flags()), body=body, attachments=attachments) # TODO assert flags are passed on defer.returnValue(mail) - def _filter_public_keys_from_attachments(self, attachments): - return filter(lambda attachment: attachment.ctype != MIME_PGP_KEY, attachments) - @defer.inlineCallbacks def _raw_message_body(self, message): content_doc = (yield message.get_wrapper().get_body(self.soledad)) -- cgit v1.2.3