diff --git a/sat/plugins/plugin_xep_0329.py b/sat/plugins/plugin_xep_0329.py index ffa6073d..26428ed5 100644 --- a/sat/plugins/plugin_xep_0329.py +++ b/sat/plugins/plugin_xep_0329.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # SAT plugin for File Information Sharing (XEP-0329) # Copyright (C) 2009-2019 Jérôme Poisson (goffi@goffi.org) diff --git a/sat_frontends/quick_frontend/quick_app.py b/sat_frontends/quick_frontend/quick_app.py index ecd730d3..2d9faee4 100644 --- a/sat_frontends/quick_frontend/quick_app.py +++ b/sat_frontends/quick_frontend/quick_app.py @@ -349,13 +349,7 @@ class QuickApp(object): log.warning(_("Can't retrieve encryption plugins: {msg}").format(msg=failure_)) def onBridgeConnected(self): - self.bridge.namespacesGet( - callback=self._namespacesGetCb, errback=self._namespacesGetEb) - # we cache available encryption plugins, as we'll use them on earch - # new chat widget - self.bridge.encryptionPluginsGet( - callback=self._encryptionPluginsGetCb, - errback=self._encryptionPluginsGetEb) + self.bridge.getReady(self.onBackendReady) def _bridgeCb(self): self.registerSignal("connected") @@ -400,6 +394,17 @@ class QuickApp(object): else: print((_("Error while initialising bridge: {}".format(failure)))) + def onBackendReady(self): + log.info("backend is ready") + self.bridge.namespacesGet( + callback=self._namespacesGetCb, errback=self._namespacesGetEb) + # we cache available encryption plugins, as we'll use them on each + # new chat widget + self.bridge.encryptionPluginsGet( + callback=self._encryptionPluginsGetCb, + errback=self._encryptionPluginsGetEb) + + @property def current_profile(self): """Profile that a user would expect to use"""