Mercurial > libervia-web
diff src/browser/sat_browser/chat.py @ 662:ebb602d8b3f2 frontends_multi_profiles
browser_side: replace all instances of 'str' with 'unicode'
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 03 Mar 2015 06:51:13 +0100 |
parents | 267761bf7f08 |
children | 423182fea41c |
line wrap: on
line diff
--- a/src/browser/sat_browser/chat.py Tue Mar 03 06:24:27 2015 +0100 +++ b/src/browser/sat_browser/chat.py Tue Mar 03 06:51:13 2015 +0100 @@ -111,7 +111,7 @@ self.vpanel.setCellHeight(self._body, '100%') self.addStyleName('chatPanel') self.setWidget(self.vpanel) - self.state_machine = plugin_xep_0085.ChatStateMachine(self.host, str(self.target)) + self.state_machine = plugin_xep_0085.ChatStateMachine(self.host, unicode(self.target)) self._state = None self.refresh() if type_ == C.CHAT_ONE2ONE: @@ -185,7 +185,7 @@ return ("ONE2ONE" if self.type == C.CHAT_ONE2ONE else "GROUP", msg) def onTextEntered(self, text): - self.host.sendMessage(str(self.target), + self.host.sendMessage(unicode(self.target), text, mess_type = C.MESS_TYPE_GROUPCHAT if self.type == C.CHAT_GROUP else C.MESS_TYPE_CHAT, errback=self.host.sendError, @@ -204,7 +204,8 @@ def setPresents(self, nicks): """Set the users presents in this room - @param occupants: list of nicks (string)""" + @param occupants (list[unicode]): list of nicks + """ self.occupants_panel.setList([jid.JID(u"%s/%s" % (self.target,nick)) for nick in nicks]) # def userJoined(self, nick, data): @@ -335,7 +336,7 @@ def setConnected(self, jid_s, resource, availability, priority, statuses): """Set connection status - @param jid_s (str): JID userhost as unicode + @param jid_s (unicode): JID userhost as unicode """ raise Exception("should not be there") # FIXME assert(jid_s == self.target.bare)