changeset 1441:b4c49c234c6b

quick_frontend (quick_chat): QuickChat._get_nick returns "" instead of None for message from the MUC
author souliane <souliane@mailoo.org>
date Tue, 14 Jul 2015 16:49:29 +0200
parents 226bbe758b1a
children 6ce18c4e5708
files frontends/src/quick_frontend/quick_chat.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_chat.py	Tue Jul 14 16:44:15 2015 +0200
+++ b/frontends/src/quick_frontend/quick_chat.py	Tue Jul 14 16:49:29 2015 +0200
@@ -160,9 +160,9 @@
         """Return nick of this entity when possible"""
         contact_list = self.host.contact_lists[self.profile]
         if self.type == C.CHAT_GROUP or entity in contact_list.getSpecialExtras(C.CONTACT_SPECIAL_GROUP):
-            return entity.resource
+            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
+            return contact_list.getCache(entity, 'nick') or contact_list.getCache(entity, 'name') or entity.node or entity
         return entity.node or entity
 
     def onPrivateCreated(self, widget):