diff --git a/app.py b/app.py index 44a0da1..54d15c4 100644 --- a/app.py +++ b/app.py @@ -80,9 +80,10 @@ back = activitypub.MicroblogPubBackend() def save_cb(box: Box, iri: str) -> None: - tasks.cache_attachments.delay(iri) if box == Box.INBOX: tasks.process_new_activity.delay(iri) + else: + tasks.cache_attachments.delay(iri) back.set_save_cb(save_cb) diff --git a/config.py b/config.py index 9031b52..855f85b 100644 --- a/config.py +++ b/config.py @@ -72,7 +72,7 @@ with open(os.path.join(KEY_DIR, "me.yml")) as f: PASS = conf["pass"] EXTRA_INBOXES = conf.get("extra_inboxes", []) - HIDE_FOLLOWING = strtobool(conf.get("hide_following", "false")) + HIDE_FOLLOWING = conf.get("hide_following", False) # Theme-related config theme_conf = conf.get("theme", {}) diff --git a/tasks.py b/tasks.py index 79a1d51..603a797 100644 --- a/tasks.py +++ b/tasks.py @@ -54,6 +54,7 @@ def process_new_activity(self, iri: str) -> None: ) log.info(f"new activity {iri} processed") + cache_attachments.delay(iri) except (ActivityGoneError, ActivityNotFoundError): log.exception(f"dropping activity {iri}") except Exception as err: