Rename variable so types don't conflict

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-03-03 19:58:21 +01:00
parent a7e969b078
commit bf3f5472f7
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -758,7 +758,7 @@ class XEP_0384(BasePlugin):
needed. 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]]] old_errors = None # type: Optional[List[Tuple[Exception, Any, Any]]]
while True: while True:
@ -772,23 +772,23 @@ class XEP_0384(BasePlugin):
expect_problems = {jid.bare: did for (jid, did) in expect_problems.items()} expect_problems = {jid.bare: did for (jid, did) in expect_problems.items()}
try: 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: if plaintext is not None:
encrypted = await self._omemo().encryptMessage( encrypted = await self._omemo().encryptMessage(
recipients, barejids,
plaintext.encode('utf-8'), plaintext.encode('utf-8'),
self.bundles, self.bundles,
expect_problems=expect_problems, expect_problems=expect_problems,
) )
elif _ignore_trust: elif _ignore_trust:
encrypted = await self._omemo().encryptRatchetForwardingMessage( encrypted = await self._omemo().encryptRatchetForwardingMessage(
recipients, barejids
self.bundles, self.bundles,
expect_problems=expect_problems, expect_problems=expect_problems,
) )
else: else:
encrypted = await self._omemo().encryptKeyTransportMessage( encrypted = await self._omemo().encryptKeyTransportMessage(
recipients, barejids,
self.bundles, self.bundles,
expect_problems=expect_problems, expect_problems=expect_problems,
) )