summaryrefslogtreecommitdiff
path: root/poezio/user.py
diff options
context:
space:
mode:
authorMaxime Buquet <pep@bouah.net>2019-02-14 17:52:30 +0100
committerMaxime Buquet <pep@bouah.net>2019-02-14 17:52:30 +0100
commit4e231185f5569a3caf8acd347cd5d7e652ab0ce4 (patch)
treebc5639229e8743b21dd7ca9e8a367a8af037d324 /poezio/user.py
parentfa2f6a62ed2db069256a75a5f9f08e0306bf4673 (diff)
parent322f02f0f4ff7b2fc622e0a08f0363d806dc0bae (diff)
downloadpoezio-4e231185f5569a3caf8acd347cd5d7e652ab0ce4.tar.gz
poezio-4e231185f5569a3caf8acd347cd5d7e652ab0ce4.tar.bz2
poezio-4e231185f5569a3caf8acd347cd5d7e652ab0ce4.tar.xz
poezio-4e231185f5569a3caf8acd347cd5d7e652ab0ce4.zip
Merge branch 'feature/xep-0392-0.5' into 'master'
Bring XEP-0392 implementation to XEP version 0.5 See merge request poezio/poezio!13
Diffstat (limited to 'poezio/user.py')
-rw-r--r--poezio/user.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/poezio/user.py b/poezio/user.py
index 655eb0de..43832917 100644
--- a/poezio/user.py
+++ b/poezio/user.py
@@ -59,7 +59,11 @@ class User:
theme = get_theme()
if theme.ccg_palette:
# use XEP-0392 CCG
- fg_color = colors.ccg_text_to_color(theme.ccg_palette, self.nick)
+ if self.jid and self.jid.domain:
+ input_ = self.jid.bare
+ else:
+ input_ = self.nick
+ fg_color = colors.ccg_text_to_color(theme.ccg_palette, input_)
self.color = fg_color, -1
else:
mod = len(theme.LIST_COLOR_NICKNAMES)