diff frontends/src/quick_frontend/quick_app.py @ 1377:017270e6eea4

quick_frontends, primitivus: know who are the MUC occupants from the presence informations: - QuickChat.occupants is now a property using cached information - some MUC handlers are no more needed, the presence handler is enough
author souliane <souliane@mailoo.org>
date Fri, 20 Mar 2015 16:25:38 +0100
parents 0befb14ecf62
children 3dae6964c071
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_app.py	Thu Mar 19 20:40:10 2015 +0100
+++ b/frontends/src/quick_frontend/quick_app.py	Fri Mar 20 16:25:38 2015 +0100
@@ -534,10 +534,6 @@
         chat_widget = self.widgets.getOrCreateWidget(quick_chat.QuickChat, room_jid, type_=C.CHAT_GROUP, profile=profile)
         chat_widget.setUserNick(user_nick)
         chat_widget.id = room_jid  # FIXME: to be removed
-        room_nicks = [unicode(nick) for nick in room_nicks]  # FIXME: should be done in DBus bridge / is that still needed?!
-        nicks = list(set([user_nick] + room_nicks))
-        nicks.sort()
-        chat_widget.setPresents(nicks)
         self.contact_lists[profile].setSpecial(room_jid, C.CONTACT_SPECIAL_GROUP)
 
     def roomLeftHandler(self, room_jid_s, profile):
@@ -553,7 +549,7 @@
         """Called when an user joined a MUC room"""
         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.replaceUser(user_nick)
+        chat_widget.addUser(user_nick)
         log.debug("user [%(user_nick)s] joined room [%(room_jid)s]" % {'user_nick': user_nick, 'room_jid': room_jid})
 
     def roomUserLeftHandler(self, room_jid_s, user_nick, user_data, profile):