1
0
Эх сурвалжийг харах

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

default 3 жил өмнө
parent
commit
049818a904
1 өөрчлөгдсөн 6 нэмэгдсэн , 1 устгасан
  1. 6 1
      data.c

+ 6 - 1
data.c

@@ -969,8 +969,13 @@ void timeline_update_indexes(snac *snac, const char *id)
 
 
         if (valid_status(object_get(id, &msg))) {
         if (valid_status(object_get(id, &msg))) {
             /* if its ours and is public, also store in public */
             /* 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");
                 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);
+            }
         }
         }
     }
     }
 }
 }