diff 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
line wrap: on
line diff
--- a/src/core/sat_main.py	Sat Apr 18 00:27:39 2015 +0200
+++ b/src/core/sat_main.py	Mon Apr 20 16:39:38 2015 +0200
@@ -603,8 +603,7 @@
         self.profiles[profile].presence.available(to_jid, show, statuses, priority)
         #XXX: FIXME: temporary fix to work around openfire 3.7.0 bug (presence is not broadcasted to generating resource)
         if '' in statuses:
-            statuses['default'] = statuses['']
-            del statuses['']
+            statuses[C.PRESENCE_STATUSES_DEFAULT] = statuses.pop('')
         self.bridge.presenceUpdate(self.profiles[profile].jid.full(), show,
                                    int(priority), statuses, profile)