diff frontends/src/quick_frontend/quick_chat.py @ 2167:4b78b4c7f805

core, frontends: various fixes for Libervia: - quick_app: don't fail when we can't get autodisconnect parameter - bridge: removed useless BridgeFrontend parent class - use of TypeError, unicode and list to workaround Pyjamas incompatibilities
author Goffi <goffi@goffi.org>
date Sun, 26 Feb 2017 18:23:01 +0100
parents c42aab22c2c0
children 8b37a62336c3
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_chat.py	Sun Feb 26 18:20:27 2017 +0100
+++ b/frontends/src/quick_frontend/quick_chat.py	Sun Feb 26 18:23:01 2017 +0100
@@ -139,7 +139,8 @@
             except KeyError:
                 log.error(u"extra data is missing user nick for uid {}".format(self.uid))
                 return ""
-        if self.parent.type == C.CHAT_GROUP or entity in contact_list.getSpecials(C.CONTACT_SPECIAL_GROUP):
+        # FIXME: converted getSpecials to list for pyjamas
+        if self.parent.type == C.CHAT_GROUP or entity in list(contact_list.getSpecials(C.CONTACT_SPECIAL_GROUP)):
             return entity.resource or ""
         if entity.bare in contact_list:
             return contact_list.getCache(entity, 'nick') or contact_list.getCache(entity, 'name') or entity.node or entity
@@ -292,7 +293,7 @@
     @staticmethod
     def getWidgetHash(target, profiles):
         profile = list(profiles)[0]
-        return profile + "\n" + target.bare
+        return profile + "\n" + unicode(target.bare)
 
     @staticmethod
     def getPrivateHash(target, profile):