diff frontends/src/quick_frontend/quick_app.py @ 1386:1f3513cfb246

quick_frontend, primivitus: remove QuickChat.getUserNick + primivitus ChatText gets the user nick directly from parent Chat instance
author souliane <souliane@mailoo.org>
date Mon, 23 Mar 2015 15:38:32 +0100
parents b01efa1c0f5e
children a025242bebe7
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_app.py	Tue Mar 24 07:38:40 2015 +0100
+++ b/frontends/src/quick_frontend/quick_app.py	Mon Mar 23 15:38:32 2015 +0100
@@ -532,7 +532,7 @@
         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 @@
 
     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)