summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--poezio/config.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/poezio/config.py b/poezio/config.py
index c87f881a..acd5f293 100644
--- a/poezio/config.py
+++ b/poezio/config.py
@@ -20,6 +20,7 @@ from configparser import RawConfigParser, NoOptionError, NoSectionError
from pathlib import Path
from shutil import copy2
from typing import Callable, Dict, List, Optional, Union, Tuple
+from slixmpp import JID
from poezio.args import parse_args
from poezio import xdg
@@ -214,7 +215,7 @@ class Config(RawConfigParser):
def get_by_tabname(self,
option,
- tabname,
+ tabname: str,
fallback=True,
fallback_server=True,
default=''):
@@ -224,6 +225,8 @@ class Config(RawConfigParser):
in the section, we search for the global option if fallback is
True. And we return `default` as a fallback as a last resort.
"""
+ if isinstance(tabname, JID):
+ tabname = tabname.full
if self.default and (not default) and fallback:
default = self.default.get(DEFSECTION, {}).get(option, '')
if tabname in self.sections():