From d704c796ff46a8189b5c98ae99e0814a4f1dc69c Mon Sep 17 00:00:00 2001 From: grunfink Date: Fri, 10 Apr 2026 16:43:13 +0200 Subject: New user toggle 'show_unlisted', to show unlisted posts in public pages and RSS feeds. --- html.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'html.c') diff --git a/html.c b/html.c index c503702..f70685f 100644 --- a/html.c +++ b/html.c @@ -3595,6 +3595,8 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only, int mark_shown = 0; + int show_unlisted = xs_is_true(xs_dict_get(user->config, "show_unlisted")); + while (xs_list_iter(&p, &v)) { xs *msg = NULL; int status; @@ -3651,9 +3653,15 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only, /* hide non-public posts from /instance view */ if (page != NULL && strcmp(page, "/instance") == 0 && scope != SCOPE_PUBLIC) continue; + /* hide non-public posts viewed from outside */ - if (read_only && (scope != SCOPE_PUBLIC && scope != SCOPE_UNLISTED)) - continue; + if (read_only) { + if (scope == SCOPE_MENTIONED || scope == SCOPE_FOLLOWERS) + continue; + + if (scope == SCOPE_UNLISTED && !show_unlisted) + continue; + } xs_html *entry = html_entry(user, msg, read_only, 0, v, (user && !hide_children) ? 0 : 1); -- cgit