# HG changeset patch # User Goffi # Date 1555222911 -7200 # Node ID d1fcb8e9aced0d5bbb0e989c2f93809057e57102 # Parent 25f14fbd364e1f39199095c9a109591af71fcae4 core: fixed component connexion: presence announcement has been moved to startConnection, but component don't have presence. This patch fixes it by moving presence announcement to clients only. diff -r 25f14fbd364e -r d1fcb8e9aced sat/core/xmpp.py --- a/sat/core/xmpp.py Sun Apr 14 08:21:51 2019 +0200 +++ b/sat/core/xmpp.py Sun Apr 14 08:21:51 2019 +0200 @@ -222,9 +222,6 @@ ) # FIXME: we should have a timeout here, and a way to know if a plugin freeze # TODO: mesure launch time of each plugin - # we finally send our presence - entity.presence.available() - def _disconnectionCb(self, __): self._connected_d = None @@ -748,6 +745,14 @@ self.presence = SatPresenceProtocol(self.host_app) self.presence.setHandlerParent(self) + @classmethod + @defer.inlineCallbacks + def startConnection(cls, host, profile, max_retries): + yield super(SatXMPPClient, cls).startConnection(host, profile, max_retries) + entity = host.profiles[profile] + # we finally send our presence + entity.presence.available() + def entityConnected(self): # we want to be sure that we got the roster return self.roster.got_roster