core (xmpp): fixes SatPresenceProtocol.available to prevent an eventual code skipping
This commit is contained in:
parent
b13938ddd4
commit
b294272020
1 changed files with 4 additions and 3 deletions
|
|
@ -364,15 +364,16 @@ class SatPresenceProtocol(xmppim.PresenceClientProtocol):
|
|||
del statuses['default']
|
||||
|
||||
presence_elt = xmppim.AvailablePresence(entity, show, statuses, priority)
|
||||
if not self.host.trigger.point("presence_available", presence_elt, self.parent):
|
||||
return
|
||||
self.send(presence_elt)
|
||||
|
||||
# ... before switching back
|
||||
if None in statuses:
|
||||
statuses['default'] = statuses[None]
|
||||
del statuses[None]
|
||||
|
||||
if not self.host.trigger.point("presence_available", presence_elt, self.parent):
|
||||
return
|
||||
self.send(presence_elt)
|
||||
|
||||
def subscribed(self, entity):
|
||||
xmppim.PresenceClientProtocol.subscribed(self, entity)
|
||||
self.host.memory.delWaitingSub(entity.userhost(), self.parent.profile)
|
||||
|
|
|
|||
Loading…
Reference in a new issue