From 76445a68670b8b1cc9a046d582ddc68982e4c221 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Tue, 20 Sep 2016 15:02:45 +0900 Subject: Add support for XEP-0380: Explicit Message Encryption Both for displaying incoming messages, and sending OTR and legacy OpenPGP. --- poezio/core/handlers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'poezio/core/handlers.py') diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py index e79e4232..a0d40dd4 100644 --- a/poezio/core/handlers.py +++ b/poezio/core/handlers.py @@ -259,7 +259,10 @@ class HandlerCore: tmp_dir=tmp_dir, extract_images=extract_images) if not body: - return + if not self.core.xmpp.plugin['xep_0380'].has_eme(message): + return + self.core.xmpp.plugin['xep_0380'].replace_body_with_eme(message) + body = msg['body'] remote_nick = '' # normal message, we are the recipient -- cgit v1.2.3