snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 049818a9042ce1da23e6fe3c41f776b1470e7cc4
parent fbd30cf6d343651c53d5761b94fdaa04b867f416
Author: default <nobody@localhost>
Date:   Sat, 29 Apr 2023 07:36:18 +0200

Public posts are also added to an instance public timeline index.

Diffstat:
Mdata.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 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); + } } } }