plugin XEP-0115: fixed caps initial check
This commit is contained in:
parent
291127e677
commit
2422d0a1d7
1 changed files with 14 additions and 8 deletions
|
|
@ -190,7 +190,7 @@ class SatXMPPEntity(object):
|
|||
self._connected.addCallback(self._disconnectionCb)
|
||||
self._connected.addErrback(self._disconnectionEb)
|
||||
|
||||
log.info(_("********** [%s] CONNECTED **********") % self.profile)
|
||||
log.info(_(u"********** [{profile}] CONNECTED **********").format(profile=self.profile))
|
||||
self.streamInitialized()
|
||||
self.host_app.bridge.connected(self.profile, unicode(self.jid)) # we send the signal to the clients
|
||||
|
||||
|
|
@ -234,7 +234,7 @@ class SatXMPPEntity(object):
|
|||
self.host_app.bridge.disconnected(self.profile) # we send the signal to the clients
|
||||
self._connected.callback(None)
|
||||
self.host_app.purgeEntity(self.profile) # and we remove references to this client
|
||||
log.info(_("********** [%s] DISCONNECTED **********") % self.profile)
|
||||
log.info(_(u"********** [{profile}] DISCONNECTED **********").format(profile=self.profile))
|
||||
if not self.conn_deferred.called:
|
||||
# FIXME: real error is not gotten here (e.g. if jid is not know by Prosody,
|
||||
# we should have the real error)
|
||||
|
|
@ -968,9 +968,10 @@ class SatPresenceProtocol(xmppim.PresenceClientProtocol):
|
|||
self.host = host
|
||||
|
||||
def send(self, obj):
|
||||
if not self.host.trigger.point("Presence send", self.parent, obj):
|
||||
presence_d = defer.succeed(None)
|
||||
if not self.host.trigger.point("Presence send", self.parent, obj, presence_d):
|
||||
return
|
||||
super(SatPresenceProtocol, self).send(obj)
|
||||
presence_d.addCallback(lambda __: super(SatPresenceProtocol, self).send(obj))
|
||||
|
||||
def availableReceived(self, entity, show=None, statuses=None, priority=0):
|
||||
log.debug(_(u"presence update for [%(entity)s] (available, show=%(show)s statuses=%(statuses)s priority=%(priority)d)") % {'entity': entity, C.PRESENCE_SHOW: show, C.PRESENCE_STATUSES: statuses, C.PRESENCE_PRIORITY: priority})
|
||||
|
|
|
|||
Loading…
Reference in a new issue