Mercurial > libervia-backend
comparison frontends/src/quick_frontend/quick_utils.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 | 84a6e83157c2 |
children | 6246eb6d64a0 |
comparison
equal
deleted
inserted
replaced
687:af0d08a84cc6 | 688:f7878ad3c846 |
---|---|
20 from sat.tools.jid import JID | 20 from sat.tools.jid import JID |
21 from os.path import exists, splitext | 21 from os.path import exists, splitext |
22 | 22 |
23 def escapePrivate(ori_jid): | 23 def escapePrivate(ori_jid): |
24 """Escape a private jid""" | 24 """Escape a private jid""" |
25 return JID(const_PRIVATE_PREFIX + ori_jid.short + '@' + ori_jid.resource) | 25 return JID(const_PRIVATE_PREFIX + ori_jid.bare + '@' + ori_jid.resource) |
26 | 26 |
27 def unescapePrivate(escaped_jid): | 27 def unescapePrivate(escaped_jid): |
28 if not escaped_jid.startswith(const_PRIVATE_PREFIX): | 28 if not escaped_jid.startswith(const_PRIVATE_PREFIX): |
29 return escaped_jid | 29 return escaped_jid |
30 escaped_split = tuple(escaped_jid[len(const_PRIVATE_PREFIX):].split('@')) | 30 escaped_split = tuple(escaped_jid[len(const_PRIVATE_PREFIX):].split('@')) |