comparison frontends/src/quick_frontend/quick_chat.py @ 513:8ee9113d307b

core, quick_frontend, primitivus, wixi, bridge: fixed delayed message timestamp: - new "extra" parameter in newMessage signal
author Goffi <goffi@goffi.org>
date Sat, 20 Oct 2012 17:23:56 +0200
parents 862c0d6ab974
children 3bd8f84f920d
comparison
equal deleted inserted replaced
512:862c0d6ab974 513:8ee9113d307b
122 unescaped = unescapePrivate(self.target) 122 unescaped = unescapePrivate(self.target)
123 if jid.startswith(const_PRIVATE_PREFIX) or unescaped.short == jid.short: 123 if jid.startswith(const_PRIVATE_PREFIX) or unescaped.short == jid.short:
124 return unescaped.resource 124 return unescaped.resource
125 return jid.resource if self.type == "group" else (self.host.contact_list.getCache(jid,'nick') or self.host.contact_list.getCache(jid,'name') or jid.node) 125 return jid.resource if self.type == "group" else (self.host.contact_list.getCache(jid,'nick') or self.host.contact_list.getCache(jid,'name') or jid.node)
126 126
127 def printMessage(self, from_jid, msg, profile, timestamp): 127 def printMessage(self, from_jid, msg, profile, timestamp = ''):
128 """Print message in chat window. Must be implemented by child class""" 128 """Print message in chat window. Must be implemented by child class"""
129 jid=JID(from_jid) 129 jid=JID(from_jid)
130 nick = self._get_nick(jid) 130 nick = self._get_nick(jid)
131 mymess = (jid.resource == self.nick) if self.type == "group" else (jid.short == self.host.profiles[profile]['whoami'].short) #mymess = True if message comes from local user 131 mymess = (jid.resource == self.nick) if self.type == "group" else (jid.short == self.host.profiles[profile]['whoami'].short) #mymess = True if message comes from local user
132 if msg.startswith('/me '): 132 if msg.startswith('/me '):