comparison frontends/src/quick_frontend/quick_chat.py @ 1428:0e518415d03a

display the resource in the chat dialog when printing a private MUC message
author souliane <souliane@mailoo.org>
date Fri, 24 Apr 2015 16:10:46 +0200
parents 069ad98b360d
children b4c49c234c6b
comparison
equal deleted inserted replaced
1427:1e833970b7f0 1428:0e518415d03a
156 156
157 self.host.bridge.getHistory(unicode(self.host.profiles[profile].whoami.bare), unicode(target), size, True, search, profile, callback=onHistory, errback=onHistoryError) 157 self.host.bridge.getHistory(unicode(self.host.profiles[profile].whoami.bare), unicode(target), size, True, search, profile, callback=onHistory, errback=onHistoryError)
158 158
159 def _get_nick(self, entity): 159 def _get_nick(self, entity):
160 """Return nick of this entity when possible""" 160 """Return nick of this entity when possible"""
161 if self.type == C.CHAT_GROUP: 161 contact_list = self.host.contact_lists[self.profile]
162 if self.type == C.CHAT_GROUP or entity in contact_list.getSpecialExtras(C.CONTACT_SPECIAL_GROUP):
162 return entity.resource 163 return entity.resource
163 contact_list = self.host.contact_lists[self.profile]
164 if entity.bare in contact_list: 164 if entity.bare in contact_list:
165 return contact_list.getCache(entity,'nick') or contact_list.getCache(entity,'name') or entity.node or entity 165 return contact_list.getCache(entity,'nick') or contact_list.getCache(entity,'name') or entity.node or entity
166 return entity.node or entity 166 return entity.node or entity
167 167
168 def onPrivateCreated(self, widget): 168 def onPrivateCreated(self, widget):