From f4d2412443ff62323db592871aa175bd1746408f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Thu, 24 Mar 2022 19:50:44 +0100 Subject: [PATCH] encrypt: pass bundle in to encryptRatchetForwarding if available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- slixmpp_omemo/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/slixmpp_omemo/__init__.py b/slixmpp_omemo/__init__.py index 068cccc..15a9699 100644 --- a/slixmpp_omemo/__init__.py +++ b/slixmpp_omemo/__init__.py @@ -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(