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, )