comparison src/browser/sat_browser/chat.py @ 909:e8b133b77aa4

browser, server: update to get compatibility with 0.7-dev (not finished): Q&D update to restore compatibility - version changed to 0.7D - contact list has been modified to be compatible with changes, but it doesn't take profit of improvment yet - messageSend partially work, there is a disconnection and an error in console logs when sending a message - message are not received yet
author Goffi <goffi@goffi.org>
date Tue, 09 Aug 2016 01:07:15 +0200
parents fa29524774d6
children 0c0551967bdf
comparison
equal deleted inserted replaced
908:f38b8be94131 909:e8b133b77aa4
160 elif self.type == C.CHAT_GROUP: 160 elif self.type == C.CHAT_GROUP:
161 msg = "This message will be sent to all the participants of the multi-user room <span class='warningTarget'>%s</span>" % self.target 161 msg = "This message will be sent to all the participants of the multi-user room <span class='warningTarget'>%s</span>" % self.target
162 return ("ONE2ONE" if self.type == C.CHAT_ONE2ONE else "GROUP", msg) 162 return ("ONE2ONE" if self.type == C.CHAT_ONE2ONE else "GROUP", msg)
163 163
164 def onTextEntered(self, text): 164 def onTextEntered(self, text):
165 self.host.sendMessage(self.target, 165 self.host.messageSend(self.target,
166 text, 166 {'': text},
167 mess_type=C.MESS_TYPE_GROUPCHAT if self.type == C.CHAT_GROUP else C.MESS_TYPE_CHAT, 167 {},
168 C.MESS_TYPE_GROUPCHAT if self.type == C.CHAT_GROUP else C.MESS_TYPE_CHAT,
169 {},
168 errback=self.host.sendError, 170 errback=self.host.sendError,
169 profile_key=C.PROF_KEY_NONE 171 profile_key=C.PROF_KEY_NONE
170 ) 172 )
171 self.chat_state_machine._onEvent("active") 173 self.chat_state_machine._onEvent("active")
172 174