[omemo] Set encryption name in event obj
This commit is contained in:
@@ -405,7 +405,7 @@ class OmemoPlugin(GajimPlugin):
|
|||||||
self.print_msg_to_log(msg.msg_)
|
self.print_msg_to_log(msg.msg_)
|
||||||
|
|
||||||
msg.msgtxt = plaintext
|
msg.msgtxt = plaintext
|
||||||
msg.encrypted = 'OMEMO'
|
msg.encrypted = self.encryption_name
|
||||||
return
|
return
|
||||||
|
|
||||||
elif msg.msg_.getTag('body'):
|
elif msg.msg_.getTag('body'):
|
||||||
@@ -498,7 +498,7 @@ class OmemoPlugin(GajimPlugin):
|
|||||||
# Gajim bug: there must be a body or the message
|
# Gajim bug: there must be a body or the message
|
||||||
# gets dropped from history
|
# gets dropped from history
|
||||||
msg.stanza.setBody(plaintext)
|
msg.stanza.setBody(plaintext)
|
||||||
msg.encrypted = 'OMEMO'
|
msg.encrypted = self.encryption_name
|
||||||
|
|
||||||
elif msg.stanza.getTag('body'):
|
elif msg.stanza.getTag('body'):
|
||||||
account = msg.conn.name
|
account = msg.conn.name
|
||||||
@@ -674,6 +674,7 @@ class OmemoPlugin(GajimPlugin):
|
|||||||
self.print_msg_to_log(event.correction_msg)
|
self.print_msg_to_log(event.correction_msg)
|
||||||
else:
|
else:
|
||||||
self.print_msg_to_log(event.msg_iq)
|
self.print_msg_to_log(event.msg_iq)
|
||||||
|
|
||||||
callback(event)
|
callback(event)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.debug(e)
|
log.debug(e)
|
||||||
@@ -732,7 +733,7 @@ class OmemoPlugin(GajimPlugin):
|
|||||||
event.msg_iq.addChild(node=store)
|
event.msg_iq.addChild(node=store)
|
||||||
self.print_msg_to_log(event.msg_iq)
|
self.print_msg_to_log(event.msg_iq)
|
||||||
event.xhtml = None
|
event.xhtml = None
|
||||||
|
event.encrypted = self.encryption_name
|
||||||
callback(event)
|
callback(event)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.debug(e)
|
log.debug(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user