From 049818a9042ce1da23e6fe3c41f776b1470e7cc4 Mon Sep 17 00:00:00 2001 From: default Date: Sat, 29 Apr 2023 07:36:18 +0200 Subject: Public posts are also added to an instance public timeline index. --- data.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'data.c') diff --git a/data.c b/data.c index c2d29c1..db42ece 100644 --- a/data.c +++ b/data.c @@ -969,8 +969,13 @@ void timeline_update_indexes(snac *snac, const char *id) if (valid_status(object_get(id, &msg))) { /* if its ours and is public, also store in public */ - if (is_msg_public(snac, msg)) + if (is_msg_public(snac, msg)) { object_user_cache_add(snac, id, "public"); + + /* also add it to the instance public timeline */ + xs *ipt = xs_fmt("%s/public.idx", srv_basedir); + index_add(ipt, id); + } } } } -- cgit v1.2.3