Wix: groups in contact list, first draft
This commit is contained in:
parent
cf6075208a
commit
6a1039a083
1 changed files with 38 additions and 10 deletions
|
|
@ -117,12 +117,11 @@ class QuickApp():
|
|||
|
||||
if show != 'unavailable':
|
||||
name=""
|
||||
group=""
|
||||
groups = []
|
||||
if self.rosterList.has_key(from_jid.short):
|
||||
if self.rosterList[from_jid.short][0].has_key("name"):
|
||||
name=self.rosterList[from_jid.short][0]["name"]
|
||||
if len(self.rosterList[from_jid.short][1]):
|
||||
group=self.rosterList[from_jid.short][1][0]
|
||||
groups=self.rosterList[from_jid.short][1]
|
||||
|
||||
#FIXME: must be moved in a plugin
|
||||
if from_jid.short in self.watched and not from_jid.short in self.onlineContact:
|
||||
|
|
@ -133,7 +132,7 @@ class QuickApp():
|
|||
self.CM.update(from_jid, 'name', name)
|
||||
self.CM.update(from_jid, 'show', show)
|
||||
self.CM.update(from_jid, 'statuses', statuses)
|
||||
self.CM.update(from_jid, 'group', group)
|
||||
self.CM.update(from_jid, 'groups', groups)
|
||||
cache = self.bridge.getProfileCache(from_jid)
|
||||
if cache.has_key('nick'):
|
||||
self.CM.update(from_jid, 'nick', cache['nick'])
|
||||
|
|
@ -188,8 +187,6 @@ class QuickApp():
|
|||
pass
|
||||
|
||||
def updatedValue(self, name, data):
|
||||
print "toto"
|
||||
print "updatedValue", name, data
|
||||
if name == "profile_nick":
|
||||
target = JID(data['jid'])
|
||||
self.CM.update(target, 'nick', data['nick'])
|
||||
|
|
|
|||
Loading…
Reference in a new issue