From fc5a1035794effd3d330b2593a1a9dc0b7f4fa02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sat, 10 Jun 2017 23:32:30 +0200 Subject: [PATCH] [pgp] Modify event obj only if we encrypt --- pgp/pgpplugin.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pgp/pgpplugin.py b/pgp/pgpplugin.py index ed87bf8..27ee338 100644 --- a/pgp/pgpplugin.py +++ b/pgp/pgpplugin.py @@ -229,6 +229,7 @@ class OldPGPPlugin(GajimPlugin): None, conn=conn, jid=obj.jid, message=obj.message, error=error, time_=time.time(), session=obj.session)) return + self.cleanup_stanza(obj) if msgenc: @@ -240,10 +241,11 @@ class OldPGPPlugin(GajimPlugin): 'namespace': nbxmpp.NS_ENCRYPTED}) obj.msg_iq.addChild(node=eme_node) - # Set xhtml to None so it doesnt get logged - obj.xhtml = None - obj.encrypted = self.encryption_name - print_msg_to_log(obj.msg_iq) + # Set xhtml to None so it doesnt get logged + obj.xhtml = None + obj.encrypted = self.encryption_name + print_msg_to_log(obj.msg_iq) + callback(obj) def encrypt_file(self, file, account, callback): -- GitLab