summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-04-20 18:55:01 +0200
committermathieui <mathieui@mathieui.net>2021-04-20 18:55:01 +0200
commite3f9af4a35ad48280dee9ebe064914f4650868f9 (patch)
treea62ad8b7dfd73c96f25fdcf771d966a29f73d7d8
parentaf311a6287f49a3d33bb7c01a0d06cbaad2102ea (diff)
downloadpoezio-e3f9af4a35ad48280dee9ebe064914f4650868f9.tar.gz
poezio-e3f9af4a35ad48280dee9ebe064914f4650868f9.tar.bz2
poezio-e3f9af4a35ad48280dee9ebe064914f4650868f9.tar.xz
poezio-e3f9af4a35ad48280dee9ebe064914f4650868f9.zip
fix: do not use get_by_tabname for muc colors
this is very wrong
-rw-r--r--poezio/tabs/muctab.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index 5cde8f68..3d9c2317 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -741,7 +741,7 @@ class MucTab(ChatTab):
user.change_nick(new_nick)
else:
user.change_nick(new_nick)
- color = config.get_by_tabname(new_nick, 'muc_colors') or None
+ color = config.getstr(new_nick, section='muc_colors') or None
user.change_color(color)
self.users.remove(user)
bisect.insort_left(self.users, user)
@@ -1179,14 +1179,14 @@ class MucTab(ChatTab):
Also, look at the colors of its possible aliases if nick_color_aliases
is set.
"""
- color = cast(str, config.get_by_tabname(nick, 'muc_colors'))
+ color = config.getstr(nick, section='muc_colors')
if color != '':
return color
nick_color_aliases = config.get_by_tabname('nick_color_aliases',
self.jid.bare)
if nick_color_aliases:
nick_alias = re.sub('^_*(.*?)_*$', '\\1', nick)
- color = config.get_by_tabname(nick_alias, 'muc_colors')
+ color = config.getstr(nick_alias, section='muc_colors')
return color
def on_self_ping_failed(self, iq: Any = None) -> None: