aboutsummaryrefslogtreecommitdiff
path: root/rss.c
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2026-04-10 16:43:13 +0200
committergrunfink <grunfink@comam.es>2026-04-10 16:43:13 +0200
commitd704c796ff46a8189b5c98ae99e0814a4f1dc69c (patch)
treec5c3db285decdc4b4cf539174d84ca032183f95c /rss.c
parentf5a2b96ac54a66f4f7d0aeb50bb13f46d9276e00 (diff)
New user toggle 'show_unlisted', to show unlisted posts in public pages and RSS feeds.
Diffstat (limited to 'rss.c')
-rw-r--r--rss.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/rss.c b/rss.c
index 8aa7f68..47fb212 100644
--- a/rss.c
+++ b/rss.c
@@ -44,6 +44,8 @@ xs_str *rss_from_timeline(snac *user, const xs_list *timeline,
int cnt = 0;
const char *v;
+ int show_unlisted = xs_is_true(xs_dict_get(user->config, "show_unlisted"));
+
xs_list_foreach(timeline, v) {
xs *msg = NULL;
@@ -66,7 +68,12 @@ xs_str *rss_from_timeline(snac *user, const xs_list *timeline,
if (!id || !content || !published)
continue;
- if (!is_msg_public(msg))
+ int scope = get_msg_visibility(msg);
+
+ if (scope == SCOPE_MENTIONED || scope == SCOPE_FOLLOWERS)
+ continue;
+
+ if (scope == SCOPE_UNLISTED && !show_unlisted)
continue;
/* create a title with the first line of the content */