summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorGravatar default2023-04-29 07:36:18 +0200
committerGravatar default2023-04-29 07:36:18 +0200
commit049818a9042ce1da23e6fe3c41f776b1470e7cc4 (patch)
tree05ee1f75a72d502142adca4779283e629a1210c5 /data.c
parentVersion 2.29 RELEASED. (diff)
downloadsnac2-049818a9042ce1da23e6fe3c41f776b1470e7cc4.tar.gz
snac2-049818a9042ce1da23e6fe3c41f776b1470e7cc4.tar.xz
snac2-049818a9042ce1da23e6fe3c41f776b1470e7cc4.zip
Public posts are also added to an instance public timeline index.
Diffstat (limited to 'data.c')
-rw-r--r--data.c7
1 files changed, 6 insertions, 1 deletions
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)
969 969
970 if (valid_status(object_get(id, &msg))) { 970 if (valid_status(object_get(id, &msg))) {
971 /* if its ours and is public, also store in public */ 971 /* if its ours and is public, also store in public */
972 if (is_msg_public(snac, msg)) 972 if (is_msg_public(snac, msg)) {
973 object_user_cache_add(snac, id, "public"); 973 object_user_cache_add(snac, id, "public");
974
975 /* also add it to the instance public timeline */
976 xs *ipt = xs_fmt("%s/public.idx", srv_basedir);
977 index_add(ipt, id);
978 }
974 } 979 }
975 } 980 }
976} 981}