Commit 1a1ed204 authored by Philipp Hörist's avatar Philipp Hörist

[omemo] Save encryption details

parent aa57b361
......@@ -191,6 +191,7 @@ class OMEMOConnection:
event.msgtxt = plaintext
event.encrypted = self.plugin.encryption_name
self.add_additional_data(event.additional_data)
def _mam_message_received(self, event):
""" Handles an incoming MAM message
......@@ -237,6 +238,7 @@ class OMEMOConnection:
event.msgtxt = plaintext
event.encrypted = self.plugin.encryption_name
self.add_additional_data(event.additional_data)
return
def _message_received(self, msg):
......@@ -315,6 +317,7 @@ class OMEMOConnection:
# gets dropped from history
msg.stanza.setBody(plaintext)
msg.encrypted = self.plugin.encryption_name
self.add_additional_data(msg.additional_data)
def room_memberlist_received(self, stanza):
if not nbxmpp.isResultNode(stanza):
......@@ -558,6 +561,7 @@ class OMEMOConnection:
self.print_msg_to_log(event.msg_iq)
event.xhtml = None
event.encrypted = self.plugin.encryption_name
self.add_additional_data(event.additional_data)
callback(event)
@staticmethod
......@@ -873,6 +877,9 @@ class OMEMOConnection:
log.debug(stanzastr)
log.debug('-'*15)
def add_additional_data(self, data):
data['encrypted'] = {'name': self.plugin.encryption_name}
class OMEMOError(Exception):
pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment