Commit d4d559ab authored by Tijmen de Mes's avatar Tijmen de Mes

Skip unsupported messages

parent 01a62612
...@@ -192,6 +192,12 @@ class MessageManager(object, metaclass=Singleton): ...@@ -192,6 +192,12 @@ class MessageManager(object, metaclass=Singleton):
disposition = None disposition = None
message_id = str(uuid.uuid4()) message_id = str(uuid.uuid4())
if (content_type.lower().startswith('text/') and
'-----BEGIN PGP MESSAGE-----' in body and
body.strip().endswith('-----END PGP MESSAGE-----') and
content_type != 'text/pgp-private-key'):
return
from blink.contacts import URIUtils from blink.contacts import URIUtils
contact, contact_uri = URIUtils.find_contact(sender.uri) contact, contact_uri = URIUtils.find_contact(sender.uri)
session_manager = SessionManager() session_manager = SessionManager()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment