comparison src/core/xmpp.py @ 1170:2df6427a5299

plugin OTR: forces FINISHED state if we are in ENCRYPTED state on contact disconnection
author souliane <souliane@mailoo.org>
date Fri, 05 Sep 2014 11:16:38 +0200
parents fe102b4cf275
children 9355f48f979e
comparison
equal deleted inserted replaced
1169:a3354063dfb6 1170:2df6427a5299
326 326
327 self.host.memory.setPresenceStatus(entity, show or "", 327 self.host.memory.setPresenceStatus(entity, show or "",
328 int(priority), statuses, 328 int(priority), statuses,
329 self.parent.profile) 329 self.parent.profile)
330 330
331 # uncomment these two lines if you need the trigger
332 #if not self.host.trigger.point("presenceReceived", entity, "unavailable", 0, statuses, self.parent.profile):
333 # return
334
331 # now it's time to notify frontends 335 # now it's time to notify frontends
332 self.host.bridge.presenceUpdate(entity.full(), show or "", 336 self.host.bridge.presenceUpdate(entity.full(), show or "",
333 int(priority), statuses, 337 int(priority), statuses,
334 self.parent.profile) 338 self.parent.profile)
335 339
341 345
342 if None in statuses: # we only want string keys 346 if None in statuses: # we only want string keys
343 statuses["default"] = statuses[None] 347 statuses["default"] = statuses[None]
344 del statuses[None] 348 del statuses[None]
345 self.host.memory.setPresenceStatus(entity, "unavailable", 0, statuses, self.parent.profile) 349 self.host.memory.setPresenceStatus(entity, "unavailable", 0, statuses, self.parent.profile)
350
351 if not self.host.trigger.point("presenceReceived", entity, "unavailable", 0, statuses, self.parent.profile):
352 return
346 353
347 # now it's time to notify frontends 354 # now it's time to notify frontends
348 self.host.bridge.presenceUpdate(entity.full(), "unavailable", 0, statuses, self.parent.profile) 355 self.host.bridge.presenceUpdate(entity.full(), "unavailable", 0, statuses, self.parent.profile)
349 356
350 def available(self, entity=None, show=None, statuses=None, priority=None): 357 def available(self, entity=None, show=None, statuses=None, priority=None):