Ensure expect_problems is a dict within encrypt_message

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2020-03-11 01:32:39 +01:00
parent ce868745d5
commit 1ac08130ed
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -579,8 +579,10 @@ class XEP_0384(BasePlugin):
# or if we hit the same set of errors.
errors = [] # type: List[omemo.exceptions.OMEMOException]
if expect_problems is not None:
expect_problems = {jid.bare: did for (jid, did) in expect_problems.items()}
if expect_problems is None:
expect_problems = {}
expect_problems = {jid.bare: did for (jid, did) in expect_problems.items()}
try:
encrypted = self._omemo.encryptMessage(