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