diff --git a/modules/fediverse/__init__.py b/modules/fediverse/__init__.py index 5f515d77..6e624ffe 100644 --- a/modules/fediverse/__init__.py +++ b/modules/fediverse/__init__.py @@ -22,7 +22,7 @@ class Module(ModuleManager.BaseModule): server_username = self.bot.get_setting("fediverse-server", None) if server_username: server_username, instance = ap_utils.split_username(server_username) - self.server = ap_server.Server(server_username, instance) + self.server = ap_server.Server(self.bot, server_username, instance) self.events.on("api.get.ap-webfinger").hook( self.server.ap_webfinger, authenticated=False) diff --git a/modules/fediverse/ap_server.py b/modules/fediverse/ap_server.py index db18d608..715801d2 100644 --- a/modules/fediverse/ap_server.py +++ b/modules/fediverse/ap_server.py @@ -1,12 +1,13 @@ import base64, binascii, os, urllib.parse from src import ModuleManager, utils -from . import ap_activities, ap_actor, ap_security +from . import ap_activities, ap_actor, ap_security, ap_utils ACTIVITY_SETTING_PREFIX = "ap-activity-" class Server(object): - def __init__(self, username, instance): + def __init__(self, bot, username, instance): + self.bot = bot self.username = username self.instance = instance