Mercurial > libervia-backend
diff frontends/src/quick_frontend/quick_app.py @ 737:378af36155c2
frontends: set and retrieve your own presence and status
author | souliane <souliane@mailoo.org> |
---|---|
date | Mon, 25 Nov 2013 01:56:07 +0100 |
parents | 6246eb6d64a0 |
children | 318acc83a392 |
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_app.py Sat Nov 23 10:21:40 2013 +0100 +++ b/frontends/src/quick_frontend/quick_app.py Mon Nov 25 01:56:07 2013 +0100 @@ -294,12 +294,13 @@ assert alert_type in ['INFO','ERROR'] self.showDialog(unicode(msg),unicode(title),alert_type.lower()) - def setStatusOnline(self, online=True): - pass + def setStatusOnline(self, online=True, show="", statuses={}): + raise NotImplementedError def presenceUpdate(self, jabber_id, show, priority, statuses, profile): if not self.check_profile(profile): return + debug(_("presence update for %(jid)s (show=%(show)s, priority=%(priority)s, statuses=%(statuses)s) [profile:%(profile)s]") % {'jid': jabber_id, 'show': show, 'priority': priority, 'statuses': statuses, 'profile': profile}) from_jid = JID(jabber_id) @@ -309,7 +310,7 @@ if show == "unavailable": self.setStatusOnline(False) else: - self.setStatusOnline(True) + self.setStatusOnline(True, show, statuses) return self.contact_list.updatePresence(from_jid, show, priority, statuses)