From eb3916e92ee01c58e302e70b32c9a50e32127c8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sat, 29 Dec 2018 07:40:01 +0100 Subject: [PATCH] xep_0384: handle OMEMO devices ns explicitely MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- plugin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin.py b/plugin.py index 8f045c3..9431033 100644 --- a/plugin.py +++ b/plugin.py @@ -157,7 +157,8 @@ class XEP_0384(BasePlugin): log.error("Couldn't load the OMEMO object; ¯\\_(ツ)_/¯") raise PluginCouldNotLoad - self.xmpp.add_event_handler('pubsub_publish', self._receive_device_list) + self.xmpp['xep_0060'].map_node_event(OMEMO_DEVICES_NS, 'omemo_device_list') + self.xmpp.add_event_handler('omemo_device_list_publish', self._receive_device_list) asyncio.ensure_future(self._set_device_list()) asyncio.ensure_future(self._publish_bundle()) @@ -165,7 +166,7 @@ class XEP_0384(BasePlugin): if not self.backend_loaded: return - self.xmpp.del_event_handler('pubsub_publish', self._receive_device_list) + self.xmpp.remove_event_handler('omemo_device_list_publish', self._receive_device_list) self.xmpp['xep_0163'].remove_interest(OMEMO_DEVICES_NS) def session_bind(self, _jid):