core: Fix status update crash
bug: 4
This commit is contained in:
parent
b92606fccc
commit
e5efd1a792
1 changed files with 11 additions and 3 deletions
|
|
@ -224,11 +224,19 @@ class SatPresenceProtocol(xmppim.PresenceClientProtocol):
|
|||
|
||||
|
||||
def available(self, entity=None, show=None, statuses=None, priority=0):
|
||||
if statuses and statuses.has_key('default'):
|
||||
if not statuses:
|
||||
statuses = {}
|
||||
# default for us is None for wokkel
|
||||
# so we must temporarily switch to wokkel's convention...
|
||||
if 'default' in statuses:
|
||||
statuses[None] = statuses['default']
|
||||
del statuses['default']
|
||||
|
||||
xmppim.PresenceClientProtocol.available(self, entity, show, statuses, priority)
|
||||
|
||||
|
||||
# ... before switching back
|
||||
if None in statuses:
|
||||
del statuses[None]
|
||||
|
||||
def subscribed(self, entity):
|
||||
xmppim.PresenceClientProtocol.subscribed(self, entity)
|
||||
self.host.memory.delWaitingSub(entity.userhost(), self.parent.profile)
|
||||
|
|
|
|||
Loading…
Reference in a new issue