diff --git a/poezio/bookmarks.py b/poezio/bookmarks.py index ede45b2e..787f8bfe 100644 --- a/poezio/bookmarks.py +++ b/poezio/bookmarks.py @@ -44,7 +44,7 @@ from slixmpp import ( from slixmpp.exceptions import IqError, IqTimeout from slixmpp.plugins.xep_0048 import Bookmarks, Conference, URL from poezio.connection import Connection -from poezio.config import config +from poezio.config import Config log = logging.getLogger(__name__) @@ -158,7 +158,7 @@ class Bookmark: class BookmarkList: - def __init__(self): + def __init__(self, config: Config): self.config = config self.bookmarks: List[Bookmark] = [] preferred = self.config.getstr('use_bookmarks_method').lower() diff --git a/poezio/connection.py b/poezio/connection.py index da64ec02..b23e8d7d 100644 --- a/poezio/connection.py +++ b/poezio/connection.py @@ -28,7 +28,7 @@ from slixmpp.util import FileSystemCache from poezio import common from poezio import fixes from poezio.libpoezio import XDG -from poezio.config import config +from poezio.config import Config class Connection(slixmpp.ClientXMPP): @@ -38,7 +38,7 @@ class Connection(slixmpp.ClientXMPP): """ __init = False - def __init__(self, custom_version=''): + def __init__(self, config: Config, custom_version=''): self.config = config keyfile = self.config.getstr('keyfile') diff --git a/poezio/core/core.py b/poezio/core/core.py index 7035edd8..084c72f7 100644 --- a/poezio/core/core.py +++ b/poezio/core/core.py @@ -148,12 +148,12 @@ class Core: status = POSSIBLE_SHOW.get(status) or '' self.status = Status(show=status, message=self.config.getstr('status_message')) self.custom_version = custom_version - self.xmpp = connection.Connection(custom_version) + self.xmpp = connection.Connection(self.config, custom_version) self.xmpp.core = self self.keyboard = keyboard.Keyboard() roster.set_node(self.xmpp.client_roster) decorators.refresh_wrapper.core = self - self.bookmarks = BookmarkList() + self.bookmarks = BookmarkList(self.config) self.remote_fifo = None self.avatar_cache = FileSystemPerJidCache( str(XDG.cache_dir), 'avatars', binary=True)