commit 57ba1d5

default  ·  2023-07-05 11:51:20 +0000 UTC
parent fe9fc2d
Pinned posts appear at the top of the public timeline.
1 files changed,  +4, -1
M html.c
M html.c
+4, -1
 1@@ -1630,7 +1630,10 @@ int html_get_handler(const xs_dict *req, const char *q_path,
 2             xs *list = timeline_list(&snac, "public", skip, show);
 3             xs *next = timeline_list(&snac, "public", skip + show, 1);
 4 
 5-            *body = html_timeline(&snac, list, 1, skip, show, xs_list_len(next));
 6+            xs *pins = pinned_list(&snac);
 7+            pins = xs_list_cat(pins, list);
 8+
 9+            *body = html_timeline(&snac, pins, 1, skip, show, xs_list_len(next));
10 
11             *b_size = strlen(*body);
12             status  = 200;