Add new replies_in_stream config item
For enabling replies in the stream section (a la Pleroma). Disabled by default.
This commit is contained in:
parent
813ea37988
commit
92add7581d
2 changed files with 7 additions and 2 deletions
|
@ -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))
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue