commit 72c31c2

default  ·  2024-08-29 05:50:10 +0000 UTC
parent 8ea199a
Pinned posts are no longer shown in the private timeline.
1 files changed,  +5, -8
M html.c
M html.c
+5, -8
 1@@ -2182,7 +2182,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only,
 2 
 3         {
 4             /* show the list of pinned posts */
 5-            xs *url = xs_fmt("%s/list/pinned", user->actor);
 6+            xs *url = xs_fmt("%s/pinned", user->actor);
 7             xs_html_add(lol,
 8                 xs_html_tag("li",
 9                     xs_html_tag("a",
10@@ -2194,7 +2194,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only,
11 
12         {
13             /* show the list of bookmarked posts */
14-            xs *url = xs_fmt("%s/list/bookmarks", user->actor);
15+            xs *url = xs_fmt("%s/bookmarks", user->actor);
16             xs_html_add(lol,
17                 xs_html_tag("li",
18                     xs_html_tag("a",
19@@ -2835,10 +2835,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
20                     xs *list = timeline_list(&snac, "private", skip, show);
21                     xs *next = timeline_list(&snac, "private", skip + show, 1);
22 
23-                    xs *pins = pinned_list(&snac);
24-                    pins = xs_list_cat(pins, list);
25-
26-                    *body = html_timeline(&snac, pins, 0, skip, show,
27+                    *body = html_timeline(&snac, list, 0, skip, show,
28                             xs_list_len(next), NULL, "/admin", 1);
29 
30                     *b_size = strlen(*body);
31@@ -2910,7 +2907,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
32         }
33     }
34     else
35-    if (strcmp(p_path, "list/pinned") == 0) { /** list of pinned posts **/
36+    if (strcmp(p_path, "pinned") == 0) { /** list of pinned posts **/
37         if (!login(&snac, req)) {
38             *body  = xs_dup(uid);
39             status = HTTP_STATUS_UNAUTHORIZED;
40@@ -2925,7 +2922,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
41         }
42     }
43     else
44-    if (strcmp(p_path, "list/bookmarks") == 0) { /** list of bookmarked posts **/
45+    if (strcmp(p_path, "bookmarks") == 0) { /** list of bookmarked posts **/
46         if (!login(&snac, req)) {
47             *body  = xs_dup(uid);
48             status = HTTP_STATUS_UNAUTHORIZED;