diff --git a/config.py b/config.py index cc51783..eefbf0b 100644 --- a/config.py +++ b/config.py @@ -174,7 +174,11 @@ if conf.get("emoji_tpl"): # Hosts blacklist BLACKLIST = conf.get("blacklist", []) -DISABLE_WEBMENTIONS = conf.get("disable_webmentions", False) +# Outbound Webmentions support for public posts +DISABLE_WEBMENTIONS = bool(conf.get("disable_webmentions", False)) + +# Whether replies should be displayed in the stream or not +REPLIES_IN_STREAM = bool(conf.get("replies_in_stream", False)) # By default, we keep 14 of inbox data ; outbox is kept forever (along with bookmarked stuff, outbox replies, liked...) DAYS_TO_KEEP = int(conf.get("days_to_keep", 14)) diff --git a/core/notifications.py b/core/notifications.py index dfb6d7d..bf4f1c7 100644 --- a/core/notifications.py +++ b/core/notifications.py @@ -9,6 +9,7 @@ from typing import Dict from little_boxes import activitypub as ap from config import DB +from config import REPLIES_IN_STREAM from core.activitypub import is_from_outbox from core.activitypub import is_local_url from core.db import find_one_activity @@ -206,7 +207,7 @@ def _create_set_inbox_flags(activity: ap.Create, new_meta: _NewMeta) -> None: # Also set the "keep mark" for the GC (as we want to keep it forever) _set_flag(new_meta, MetaKey.GC_KEEP) - if not in_reply_to: + if not in_reply_to or REPLIES_IN_STREAM: # A good candidate for displaying in the stream _set_flag(new_meta, MetaKey.STREAM)