comparison src/core/sat_main.py @ 1417:176de79c8c39

core, plugin XEP-0045, frontends: change frontend method "setStatusOnline" for "setPresenceStatus": - remove parameter "online" (can be guess from "presence" value) - process "statuses" dict in quick_frontend, so this method can get a simple unicode "status" - add C.PRESENCE_STATUSES_DEFAULT to define the key to use for fallback status
author souliane <souliane@mailoo.org>
date Mon, 20 Apr 2015 16:39:38 +0200
parents 3265a2639182
children ceba6fd77739
comparison
equal deleted inserted replaced
1416:a419da93afef 1417:176de79c8c39
601 assert profile 601 assert profile
602 priority = int(self.memory.getParamA("Priority", "Connection", profile_key=profile)) 602 priority = int(self.memory.getParamA("Priority", "Connection", profile_key=profile))
603 self.profiles[profile].presence.available(to_jid, show, statuses, priority) 603 self.profiles[profile].presence.available(to_jid, show, statuses, priority)
604 #XXX: FIXME: temporary fix to work around openfire 3.7.0 bug (presence is not broadcasted to generating resource) 604 #XXX: FIXME: temporary fix to work around openfire 3.7.0 bug (presence is not broadcasted to generating resource)
605 if '' in statuses: 605 if '' in statuses:
606 statuses['default'] = statuses[''] 606 statuses[C.PRESENCE_STATUSES_DEFAULT] = statuses.pop('')
607 del statuses['']
608 self.bridge.presenceUpdate(self.profiles[profile].jid.full(), show, 607 self.bridge.presenceUpdate(self.profiles[profile].jid.full(), show,
609 int(priority), statuses, profile) 608 int(priority), statuses, profile)
610 609
611 def subscription(self, subs_type, raw_jid, profile_key): 610 def subscription(self, subs_type, raw_jid, profile_key):
612 """Called to manage subscription 611 """Called to manage subscription