comparison src/core/xmpp.py @ 1690:772c8edd1057

core: fixed cache check on presence unavailable
author Goffi <goffi@goffi.org>
date Fri, 27 Nov 2015 10:15:23 +0100
parents 43a127b6a4f2
children 4308bca92922
comparison
equal deleted inserted replaced
1689:a40124e03baf 1690:772c8edd1057
394 394
395 # now it's time to notify frontends 395 # now it's time to notify frontends
396 # if the entity is not known yet in this session or is already unavailable, there is no need to send an unavailable signal 396 # if the entity is not known yet in this session or is already unavailable, there is no need to send an unavailable signal
397 try: 397 try:
398 presence = self.host.memory.getEntityDatum(entity, "presence", self.parent.profile) 398 presence = self.host.memory.getEntityDatum(entity, "presence", self.parent.profile)
399 except KeyError: 399 except (KeyError, exceptions.UnknownEntityError):
400 # the entity has not been seen yet in this session 400 # the entity has not been seen yet in this session
401 pass 401 pass
402 else: 402 else:
403 if presence.show != C.PRESENCE_UNAVAILABLE: 403 if presence.show != C.PRESENCE_UNAVAILABLE:
404 self.host.bridge.presenceUpdate(entity.full(), C.PRESENCE_UNAVAILABLE, 0, statuses, self.parent.profile) 404 self.host.bridge.presenceUpdate(entity.full(), C.PRESENCE_UNAVAILABLE, 0, statuses, self.parent.profile)