comparison src/core/xmpp.py @ 1434:b06047e1c1fb

primitivus: fix setting the presence and status
author souliane <souliane@mailoo.org>
date Wed, 10 Jun 2015 09:18:34 +0200
parents 70abe871eac3
children 7590bbf44eed
comparison
equal deleted inserted replaced
1433:5d42e2219d7c 1434:b06047e1c1fb
352 352
353 # now it's time to notify frontends 353 # now it's time to notify frontends
354 self.host.bridge.presenceUpdate(entity.full(), "unavailable", 0, statuses, self.parent.profile) 354 self.host.bridge.presenceUpdate(entity.full(), "unavailable", 0, statuses, self.parent.profile)
355 355
356 def available(self, entity=None, show=None, statuses=None, priority=None): 356 def available(self, entity=None, show=None, statuses=None, priority=None):
357 """Set a presence and statuses.
358
359 @param entity (jid.JID): entity
360 @param show (unicode): value in ('unavailable', '', 'away', 'xa', 'chat', 'dnd')
361 @param statuses (dict{unicode: unicode}): multilingual statuses with
362 the entry key beeing a language code on 2 characters or "default".
363 """
357 if priority is None: 364 if priority is None:
358 try: 365 try:
359 priority = int(self.host.memory.getParamA("Priority", "Connection", profile_key=self.parent.profile)) 366 priority = int(self.host.memory.getParamA("Priority", "Connection", profile_key=self.parent.profile))
360 except ValueError: 367 except ValueError:
361 priority = 0 368 priority = 0