From c506c85f8a4e947a148a85c44db9e5e0f912710d Mon Sep 17 00:00:00 2001 From: fawz Date: Mon, 9 Dec 2019 17:46:05 +0100 Subject: [PATCH] Populate expect_problems with JID instances instead of bare_jids --- slixmpp_omemo/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/slixmpp_omemo/__init__.py b/slixmpp_omemo/__init__.py index a89250a..5ddb5a7 100644 --- a/slixmpp_omemo/__init__.py +++ b/slixmpp_omemo/__init__.py @@ -595,7 +595,8 @@ class XEP_0384(BasePlugin): # OMEMO lib to not encrypt to this device if exn.problem == 'undecided': raise UndecidedException(exn.bare_jid, exn.device, exn.ik) - expect_problems.setdefault(exn.bare_jid, []).append(exn.device) + distrusted_jid = JID(exn.bare_jid) + expect_problems.setdefault(distrusted_jid, []).append(exn.device) elif isinstance(exn, omemo.exceptions.NoEligibleDevicesException): # This error is returned by the library to specify that # encryption is not possible to any device of a user.