From a7c7689cc8d334a26c49c6cc031494f87920f943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Fri, 9 Nov 2018 23:15:24 +0100 Subject: [PATCH] [pgp] Show correct message encryption icon --- pgp/pgpplugin.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pgp/pgpplugin.py b/pgp/pgpplugin.py index 262cb25..af7d7f2 100644 --- a/pgp/pgpplugin.py +++ b/pgp/pgpplugin.py @@ -157,6 +157,7 @@ class OldPGPPlugin(GajimPlugin): key_id = app.config.get_per('accounts', account, 'keyid') if key_id: obj.encrypted = self.encryption_name + self.add_additional_data(obj.additional_data) self.decrypt_queue.put([encmsg, key_id, obj, conn, callback]) if not self.thread: self.thread = threading.Thread(target=self.worker) @@ -255,6 +256,7 @@ class OldPGPPlugin(GajimPlugin): # Set xhtml to None so it doesnt get logged obj.xhtml = None obj.encrypted = self.encryption_name + self.add_additional_data(obj.additional_data) print_msg_to_log(obj.msg_iq) callback(obj) @@ -282,7 +284,7 @@ class OldPGPPlugin(GajimPlugin): return GLib.idle_add(callback, file) - @staticmethod + @staticmethod def _on_file_encryption_error(file, error): dialogs.ErrorDialog( _('Error'), error, transient_for=file.control.parent_win.window) @@ -301,6 +303,9 @@ class OldPGPPlugin(GajimPlugin): stanza.addChild(node=node) obj.msg_iq = stanza + def add_additional_data(self, data): + data['encrypted'] = {'name': self.encryption_name} + def print_msg_to_log(stanza): """ Prints a stanza in a fancy way to the log """