comparison src/core/sat_main.py @ 727:c1cd6c0c2c38

core: fixed statuses parameter in setPresence, and using @NONE@ instead of @DEFAULT@ for default profile_key
author Goffi <goffi@goffi.org>
date Tue, 10 Dec 2013 17:25:31 +0100
parents ab9620029aa8
children e07afabc4a25
comparison
equal deleted inserted replaced
726:ade9997fabfa 727:c1cd6c0c2c38
548 profile=profile) 548 profile=profile)
549 549
550 treatments.addCallback(sendAndStore) 550 treatments.addCallback(sendAndStore)
551 treatments.callback(mess_data) 551 treatments.callback(mess_data)
552 552
553 def setPresence(self, to="", show="", priority=0, statuses={}, profile_key='@DEFAULT@'): 553 def setPresence(self, to="", show="", priority=0, statuses=None, profile_key='@NONE@'):
554 """Send our presence information""" 554 """Send our presence information"""
555 if statuses is None:
556 statuses = {}
555 profile = self.memory.getProfileName(profile_key) 557 profile = self.memory.getProfileName(profile_key)
556 assert(profile) 558 assert(profile)
557 to_jid = jid.JID(to) if to else None 559 to_jid = jid.JID(to) if to else None
558 self.profiles[profile].presence.available(to_jid, show, statuses, priority) 560 self.profiles[profile].presence.available(to_jid, show, statuses, priority)
559 #XXX: FIXME: temporary fix to work around openfire 3.7.0 bug (presence is not broadcasted to generating resource) 561 #XXX: FIXME: temporary fix to work around openfire 3.7.0 bug (presence is not broadcasted to generating resource)