From f7e6d37dce0f939b5463a955655e6dea6a9fff3e Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sat, 7 Jul 2018 13:18:01 +0200 Subject: [PATCH] Re-add support for "extra inboxes" This allow to start posting public activities to other instances without follower. --- activitypub.py | 4 ++++ config.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/activitypub.py b/activitypub.py index 55ba6ce..338abd8 100644 --- a/activitypub.py +++ b/activitypub.py @@ -19,6 +19,7 @@ from config import ME from config import USER_AGENT from config import USERNAME from config import MEDIA_CACHE +from config import EXTRA_INBOXES from utils.media import Kind from little_boxes import activitypub as ap from little_boxes import strtobool @@ -65,6 +66,9 @@ class MicroblogPubBackend(Backend): """Setup a custom user agent.""" return USER_AGENT + def extra_inboxes(self) -> List[str]: + return EXTRA_INBOXES + def base_url(self) -> str: """Base URL config.""" return BASE_URL diff --git a/config.py b/config.py index c145932..9e7b844 100644 --- a/config.py +++ b/config.py @@ -70,7 +70,7 @@ with open(os.path.join(KEY_DIR, "me.yml")) as f: SUMMARY = conf["summary"] ICON_URL = conf["icon_url"] PASS = conf["pass"] - PUBLIC_INSTANCES = conf.get("public_instances", []) + EXTRA_INBOXES = conf.get("extra_inboxes", []) # Theme-related config theme_conf = conf.get("theme", {})