summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-07-05 13:51:20 +0200
committerdefault <nobody@localhost>2023-07-05 13:51:20 +0200
commit57ba1d575fdd92adc61dc0498ba3bc271cd7aa6e (patch)
treea62e8ca8c5851f69fb70e9b6f21e7409e1cc973a /html.c
parentfe9fc2d4b6eb1a00d4ecb3beeb4f51080c54b4be (diff)
Pinned posts appear at the top of the public timeline.
Diffstat (limited to 'html.c')
-rw-r--r--html.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/html.c b/html.c
index 2eb542a..ff0e6df 100644
--- a/html.c
+++ b/html.c
@@ -1630,7 +1630,10 @@ int html_get_handler(const xs_dict *req, const char *q_path,
xs *list = timeline_list(&snac, "public", skip, show);
xs *next = timeline_list(&snac, "public", skip + show, 1);
- *body = html_timeline(&snac, list, 1, skip, show, xs_list_len(next));
+ xs *pins = pinned_list(&snac);
+ pins = xs_list_cat(pins, list);
+
+ *body = html_timeline(&snac, pins, 1, skip, show, xs_list_len(next));
*b_size = strlen(*body);
status = 200;