commit 049818a

default  ·  2023-04-29 05:36:18 +0000 UTC
parent fbd30cf
Public posts are also added to an instance public timeline index.
1 files changed,  +6, -1
M data.c
M data.c
+6, -1
 1@@ -969,8 +969,13 @@ void timeline_update_indexes(snac *snac, const char *id)
 2 
 3         if (valid_status(object_get(id, &msg))) {
 4             /* if its ours and is public, also store in public */
 5-            if (is_msg_public(snac, msg))
 6+            if (is_msg_public(snac, msg)) {
 7                 object_user_cache_add(snac, id, "public");
 8+
 9+                /* also add it to the instance public timeline */
10+                xs *ipt = xs_fmt("%s/public.idx", srv_basedir);
11+                index_add(ipt, id);
12+            }
13         }
14     }
15 }