From 7492508d6cec34c62d74f6415c84b1ea5d46416b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Tue, 29 Jan 2019 18:01:21 +0100 Subject: [PATCH] xep_0384: Move publish calls on session_bind MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.py b/plugin.py index e736fbc..9ce2348 100644 --- a/plugin.py +++ b/plugin.py @@ -168,8 +168,6 @@ class XEP_0384(BasePlugin): 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()) return None def plugin_end(self): @@ -181,6 +179,8 @@ class XEP_0384(BasePlugin): def session_bind(self, _jid): self.xmpp['xep_0163'].add_interest(OMEMO_DEVICES_NS) + asyncio.ensure_future(self._set_device_list()) + asyncio.ensure_future(self._publish_bundle()) def my_device_id(self) -> int: return self._device_id