Mercurial > libervia-backend
diff frontends/src/quick_frontend/quick_chat.py @ 688:f7878ad3c846
tools: renamed tools.jid.JID attribute "short" to "bare"
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 29 Oct 2013 16:26:55 +0100 |
parents | 0b9bd47dffcd |
children | 6246eb6d64a0 |
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_chat.py Mon Oct 28 19:04:49 2013 +0100 +++ b/frontends/src/quick_frontend/quick_chat.py Tue Oct 29 16:26:55 2013 +0100 @@ -110,15 +110,15 @@ if self.target.startswith(const_PRIVATE_PREFIX): target = unescapePrivate(self.target) else: - target = self.target.short + target = self.target.bare - self.host.bridge.getHistory(self.host.profiles[profile]['whoami'].short, target, 20, profile=profile, callback=onHistory, errback=onHistoryError) + self.host.bridge.getHistory(self.host.profiles[profile]['whoami'].bare, target, 20, profile=profile, callback=onHistory, errback=onHistoryError) def _get_nick(self, jid): """Return nick of this jid when possible""" if self.target.startswith(const_PRIVATE_PREFIX): unescaped = unescapePrivate(self.target) - if jid.startswith(const_PRIVATE_PREFIX) or unescaped.short == jid.short: + if jid.startswith(const_PRIVATE_PREFIX) or unescaped.bare == jid.bare: return unescaped.resource 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,7 +126,7 @@ """Print message in chat window. Must be implemented by child class""" jid=JID(from_jid) nick = self._get_nick(jid) - 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 + mymess = (jid.resource == self.nick) if self.type == "group" else (jid.bare == self.host.profiles[profile]['whoami'].bare) #mymess = True if message comes from local user if msg.startswith('/me '): self.printInfo('* %s %s' % (nick, msg[4:]),type='me', timestamp=timestamp) return