MAM: Detect nbxmpp supported encryptions
This commit is contained in:
parent
1256372d36
commit
6f61f05377
|
@ -164,14 +164,18 @@ class MAM:
|
||||||
else:
|
else:
|
||||||
event = MamMessageReceivedEvent(None, **event_attrs)
|
event = MamMessageReceivedEvent(None, **event_attrs)
|
||||||
|
|
||||||
app.plugin_manager.extension_point(
|
if properties.is_encrypted:
|
||||||
'decrypt', self._con, event, self._decryption_finished)
|
event.additional_data['encrypted'] = properties.encrypted.additional_data
|
||||||
|
|
||||||
if not event.encrypted:
|
|
||||||
eme = parse_eme(event.message)
|
|
||||||
if eme is not None:
|
|
||||||
event.msgtxt = eme
|
|
||||||
self._decryption_finished(event)
|
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
|
raise nbxmpp.NodeProcessed
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue