changeset 46:d6a63942d5ad

chat: fixed MUC joining following changes in backend
author Goffi <goffi@goffi.org>
date Sat, 10 Sep 2016 00:04:18 +0200
parents b0595a33465d
children abb81efef3bb
files src/cagou/plugins/plugin_wid_chat.py
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/cagou/plugins/plugin_wid_chat.py	Sun Sep 04 19:38:21 2016 +0200
+++ b/src/cagou/plugins/plugin_wid_chat.py	Sat Sep 10 00:04:18 2016 +0200
@@ -94,8 +94,8 @@
 
 class Chat(quick_chat.QuickChat, cagou_widget.CagouWidget):
 
-    def __init__(self, host, target, type_=C.CHAT_ONE2ONE, occupants=None, subject=None, profiles=None):
-        quick_chat.QuickChat.__init__(self, host, target, type_, occupants, subject, profiles=profiles)
+    def __init__(self, host, target, type_=C.CHAT_ONE2ONE, nick=None, occupants=None, subject=None, profiles=None):
+        quick_chat.QuickChat.__init__(self, host, target, type_, nick, occupants, subject, profiles=profiles)
         cagou_widget.CagouWidget.__init__(self)
         self.header_input.hint_text = u"You are talking with {}".format(target)
         scroll_view = ScrollView(size_hint=(1,0.8), scroll_y=0, do_scroll_x=False)
@@ -141,8 +141,10 @@
             )
         input_widget.text = ''
 
-    def _mucJoinCb(self, bare):
-        jid_ = jid.JID(bare)
+    def _mucJoinCb(self, joined_data):
+        joined, room_jid_s, occupants, user_nick, subject, profile = joined_data
+        self.host.mucRoomJoinedHandler(*joined_data[1:])
+        jid_ = jid.JID(room_jid_s)
         self.changeWidget(jid_)
 
     def _mucJoinEb(self, failure):