Commit bed46293 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

[omemo] Show error when message was not encrypted for our device

Fixes #452
parent f36c9e99
......@@ -242,9 +242,17 @@ class OMEMO(BaseModule):
trust = Trust.VERIFIED
del self._muc_temp_store[properties.omemo.payload]
except (DecryptionFailed, MessageNotForDevice):
except DecryptionFailed:
except MessageNotForDevice:
plaintext = _('This message was encrypted with OMEMO, '
'but not for your device.')
# Neither trust nor fingerprint can be verified if we didn't
# successfully decrypt the message
trust = Trust.UNTRUSTED
fingerprint = None
prepare_stanza(stanza, plaintext)
properties.encrypted = EncryptionData({'name': ENCRYPTION_NAME,
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