quick_frontend, primivitus: remove QuickChat.getUserNick + primivitus ChatText gets the user nick directly from parent Chat instance

This commit is contained in:
souliane 2015-03-23 15:38:32 +01:00
commit 5c1fe63580

View file

@ -532,7 +532,7 @@ class QuickApp(object):
log.debug("Room [%(room_jid)s] joined by %(profile)s, users presents:%(users)s" % {'room_jid': room_jid_s, 'profile': profile, 'users': room_nicks})
room_jid = jid.JID(room_jid_s)
chat_widget = self.widgets.getOrCreateWidget(quick_chat.QuickChat, room_jid, type_=C.CHAT_GROUP, profile=profile)
chat_widget.setUserNick(user_nick)
chat_widget.setUserNick(unicode(user_nick))
self.contact_lists[profile].setSpecial(room_jid, C.CONTACT_SPECIAL_GROUP)
def roomLeftHandler(self, room_jid_s, profile):
@ -642,7 +642,7 @@ class QuickApp(object):
def entityDataUpdatedHandler(self, entity_s, key, value, profile):
entity = jid.JID(entity_s)
if key == "nick":
if key == "nick": # this is the roster nick, not the MUC nick
if entity in self.contact_lists[profile]:
self.contact_lists[profile].setCache(entity, 'nick', value)
self.callListeners('nick', entity, value, profile=profile)