encrypt: pass bundle in to encryptRatchetForwarding if available

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-03-24 19:50:44 +01:00
parent 2c4dc24b84
commit f4d2412443
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -779,10 +779,11 @@ class XEP_0384(BasePlugin):
elif _ignore_trust:
if not _device_id or len(barejids) != 1:
raise ErroneousParameter
bundle = self.bundles.get(barejids[0], {}).get(_device_id, None)
encrypted = await self._omemo().encryptRatchetForwardingMessage(
bare_jid=barejids[0],
device_id=_device_id,
bundle=None,
bundle=bundle,
)
else:
encrypted = await self._omemo().encryptKeyTransportMessage(