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.
This commit is contained in:
parent
553ebe5ab8
commit
c3fcfb3d64
1 changed files with 8 additions and 3 deletions
|
|
@ -222,9 +222,6 @@ class SatXMPPEntity(object):
|
|||
) # 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 @@ class SatXMPPClient(SatXMPPEntity, wokkel_client.XMPPClient):
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue