From bf3f5472f757454ec21f9cd0744e044a01c8d7b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Thu, 3 Mar 2022 19:58:21 +0100 Subject: [PATCH] Rename variable so types don't conflict 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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/slixmpp_omemo/__init__.py b/slixmpp_omemo/__init__.py index 1e0f314..f2820e4 100644 --- a/slixmpp_omemo/__init__.py +++ b/slixmpp_omemo/__init__.py @@ -758,7 +758,7 @@ class XEP_0384(BasePlugin): needed. """ - recipients = [jid.bare for jid in recipients] + barejids: List[str] = [jid.bare for jid in recipients] old_errors = None # type: Optional[List[Tuple[Exception, Any, Any]]] while True: @@ -772,23 +772,23 @@ class XEP_0384(BasePlugin): expect_problems = {jid.bare: did for (jid, did) in expect_problems.items()} try: - log.debug('Encryption: attempt to encrypt for JIDs: %r', recipients) + log.debug('Encryption: attempt to encrypt for JIDs: %r', barejids) if plaintext is not None: encrypted = await self._omemo().encryptMessage( - recipients, + barejids, plaintext.encode('utf-8'), self.bundles, expect_problems=expect_problems, ) elif _ignore_trust: encrypted = await self._omemo().encryptRatchetForwardingMessage( - recipients, + barejids self.bundles, expect_problems=expect_problems, ) else: encrypted = await self._omemo().encryptKeyTransportMessage( - recipients, + barejids, self.bundles, expect_problems=expect_problems, )