frontends: set and retrieve your own presence and status
This commit is contained in:
parent
f5dd3f2265
commit
4d393d47c0
1 changed files with 145 additions and 22 deletions
|
|
@ -294,12 +294,13 @@ class QuickApp(object):
|
|||
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 @@ class QuickApp(object):
|
|||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue