Ensure `expect_problems` is a dict within encrypt_message

Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <pep@bouah.net>
parent ce868745
...@@ -579,8 +579,10 @@ class XEP_0384(BasePlugin): ...@@ -579,8 +579,10 @@ class XEP_0384(BasePlugin):
# or if we hit the same set of errors. # or if we hit the same set of errors.
errors = [] # type: List[omemo.exceptions.OMEMOException] errors = [] # type: List[omemo.exceptions.OMEMOException]
if expect_problems is not None: if expect_problems is None:
expect_problems = {jid.bare: did for (jid, did) in expect_problems.items()} expect_problems = {}
expect_problems = {jid.bare: did for (jid, did) in expect_problems.items()}
try: try:
encrypted = self._omemo.encryptMessage( encrypted = self._omemo.encryptMessage(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment