encryptRatchetForwardingMessage: bundle isn't required for our use-cases

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-03-03 21:31:04 +01:00
parent 6ab8bba4f0
commit 3e92fc0516
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -773,13 +773,9 @@ class XEP_0384(BasePlugin):
elif _ignore_trust: elif _ignore_trust:
if not _device_id or len(barejids) != 1: if not _device_id or len(barejids) != 1:
raise ErroneousParameter raise ErroneousParameter
bundle = self.bundles.get(barejids[0], {}).get(_device_id)
if bundle is None:
error = omemo.exceptions.MissingBundleException(barejids[0], _device_id)
raise omemo.exceptions.EncryptionProblemsException([error])
encrypted = await self._omemo().encryptRatchetForwardingMessage( encrypted = await self._omemo().encryptRatchetForwardingMessage(
barejids[0], bare_jid=barejids[0],
bundle, bundle=None,
expect_problems=expect_problems, expect_problems=expect_problems,
) )
else: else: