[pgp] Show correct message encryption icon
This commit is contained in:
@@ -157,6 +157,7 @@ class OldPGPPlugin(GajimPlugin):
|
|||||||
key_id = app.config.get_per('accounts', account, 'keyid')
|
key_id = app.config.get_per('accounts', account, 'keyid')
|
||||||
if key_id:
|
if key_id:
|
||||||
obj.encrypted = self.encryption_name
|
obj.encrypted = self.encryption_name
|
||||||
|
self.add_additional_data(obj.additional_data)
|
||||||
self.decrypt_queue.put([encmsg, key_id, obj, conn, callback])
|
self.decrypt_queue.put([encmsg, key_id, obj, conn, callback])
|
||||||
if not self.thread:
|
if not self.thread:
|
||||||
self.thread = threading.Thread(target=self.worker)
|
self.thread = threading.Thread(target=self.worker)
|
||||||
@@ -255,6 +256,7 @@ class OldPGPPlugin(GajimPlugin):
|
|||||||
# Set xhtml to None so it doesnt get logged
|
# Set xhtml to None so it doesnt get logged
|
||||||
obj.xhtml = None
|
obj.xhtml = None
|
||||||
obj.encrypted = self.encryption_name
|
obj.encrypted = self.encryption_name
|
||||||
|
self.add_additional_data(obj.additional_data)
|
||||||
print_msg_to_log(obj.msg_iq)
|
print_msg_to_log(obj.msg_iq)
|
||||||
|
|
||||||
callback(obj)
|
callback(obj)
|
||||||
@@ -301,6 +303,9 @@ class OldPGPPlugin(GajimPlugin):
|
|||||||
stanza.addChild(node=node)
|
stanza.addChild(node=node)
|
||||||
obj.msg_iq = stanza
|
obj.msg_iq = stanza
|
||||||
|
|
||||||
|
def add_additional_data(self, data):
|
||||||
|
data['encrypted'] = {'name': self.encryption_name}
|
||||||
|
|
||||||
|
|
||||||
def print_msg_to_log(stanza):
|
def print_msg_to_log(stanza):
|
||||||
""" Prints a stanza in a fancy way to the log """
|
""" Prints a stanza in a fancy way to the log """
|
||||||
|
|||||||
Reference in New Issue
Block a user