From e3f9af4a35ad48280dee9ebe064914f4650868f9 Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 20 Apr 2021 18:55:01 +0200 Subject: [PATCH] fix: do not use get_by_tabname for muc colors this is very wrong --- poezio/tabs/muctab.py | 6 +++--- 1 file 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: