xep_0384: pass the UntrustedException to the user

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2019-01-30 23:17:48 +01:00
parent 2455d00d59
commit 7ccd6c89fb

View file

@ -340,10 +340,7 @@ class XEP_0384(BasePlugin):
# in any case, but we want to tell the user, always.
raise NoAvailableSession(jid, sid)
except (omemo.exceptions.UntrustedException,) as e:
# TODO: Pass the exception down to the lib user
# raise UntrustedException(e)
self.trust(JID(e.bare_jid), e.device, e.ik)
return self.decrypt_message(msg)
raise UntrustedException(e)
finally:
asyncio.ensure_future(self._publish_bundle())