ap_server needs ap_utils import, pass bot instance to it too
This commit is contained in:
parent
52a1b885ae
commit
89072de213
2 changed files with 4 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue