Commit 6f61f053 authored by Philipp Hörist's avatar Philipp Hörist

MAM: Detect nbxmpp supported encryptions

parent 1256372d
......@@ -164,14 +164,18 @@ class MAM:
else:
event = MamMessageReceivedEvent(None, **event_attrs)
app.plugin_manager.extension_point(
'decrypt', self._con, event, self._decryption_finished)
if not event.encrypted:
eme = parse_eme(event.message)
if eme is not None:
event.msgtxt = eme
if properties.is_encrypted:
event.additional_data['encrypted'] = properties.encrypted.additional_data
self._decryption_finished(event)
else:
app.plugin_manager.extension_point(
'decrypt', self._con, event, self._decryption_finished)
if not event.encrypted:
eme = parse_eme(event.message)
if eme is not None:
event.msgtxt = eme
self._decryption_finished(event)
raise nbxmpp.NodeProcessed
......
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