diff options
| author | 2024-08-29 07:50:10 +0200 | |
|---|---|---|
| committer | 2024-08-29 07:50:10 +0200 | |
| commit | 72c31c28efeaa12eb886d49df177e45726e76eff (patch) | |
| tree | ecee367a4b1eaac02fd1cda536529d30e4e2cf8f /html.c | |
| parent | The list of bookmarked posts also work. (diff) | |
| download | penes-snac2-72c31c28efeaa12eb886d49df177e45726e76eff.tar.gz penes-snac2-72c31c28efeaa12eb886d49df177e45726e76eff.tar.xz penes-snac2-72c31c28efeaa12eb886d49df177e45726e76eff.zip | |
Pinned posts are no longer shown in the private timeline.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 13 |
1 files changed, 5 insertions, 8 deletions
| @@ -2182,7 +2182,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only, | |||
| 2182 | 2182 | ||
| 2183 | { | 2183 | { |
| 2184 | /* show the list of pinned posts */ | 2184 | /* show the list of pinned posts */ |
| 2185 | xs *url = xs_fmt("%s/list/pinned", user->actor); | 2185 | xs *url = xs_fmt("%s/pinned", user->actor); |
| 2186 | xs_html_add(lol, | 2186 | xs_html_add(lol, |
| 2187 | xs_html_tag("li", | 2187 | xs_html_tag("li", |
| 2188 | xs_html_tag("a", | 2188 | xs_html_tag("a", |
| @@ -2194,7 +2194,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only, | |||
| 2194 | 2194 | ||
| 2195 | { | 2195 | { |
| 2196 | /* show the list of bookmarked posts */ | 2196 | /* show the list of bookmarked posts */ |
| 2197 | xs *url = xs_fmt("%s/list/bookmarks", user->actor); | 2197 | xs *url = xs_fmt("%s/bookmarks", user->actor); |
| 2198 | xs_html_add(lol, | 2198 | xs_html_add(lol, |
| 2199 | xs_html_tag("li", | 2199 | xs_html_tag("li", |
| 2200 | xs_html_tag("a", | 2200 | xs_html_tag("a", |
| @@ -2835,10 +2835,7 @@ int html_get_handler(const xs_dict *req, const char *q_path, | |||
| 2835 | xs *list = timeline_list(&snac, "private", skip, show); | 2835 | xs *list = timeline_list(&snac, "private", skip, show); |
| 2836 | xs *next = timeline_list(&snac, "private", skip + show, 1); | 2836 | xs *next = timeline_list(&snac, "private", skip + show, 1); |
| 2837 | 2837 | ||
| 2838 | xs *pins = pinned_list(&snac); | 2838 | *body = html_timeline(&snac, list, 0, skip, show, |
| 2839 | pins = xs_list_cat(pins, list); | ||
| 2840 | |||
| 2841 | *body = html_timeline(&snac, pins, 0, skip, show, | ||
| 2842 | xs_list_len(next), NULL, "/admin", 1); | 2839 | xs_list_len(next), NULL, "/admin", 1); |
| 2843 | 2840 | ||
| 2844 | *b_size = strlen(*body); | 2841 | *b_size = strlen(*body); |
| @@ -2910,7 +2907,7 @@ int html_get_handler(const xs_dict *req, const char *q_path, | |||
| 2910 | } | 2907 | } |
| 2911 | } | 2908 | } |
| 2912 | else | 2909 | else |
| 2913 | if (strcmp(p_path, "list/pinned") == 0) { /** list of pinned posts **/ | 2910 | if (strcmp(p_path, "pinned") == 0) { /** list of pinned posts **/ |
| 2914 | if (!login(&snac, req)) { | 2911 | if (!login(&snac, req)) { |
| 2915 | *body = xs_dup(uid); | 2912 | *body = xs_dup(uid); |
| 2916 | status = HTTP_STATUS_UNAUTHORIZED; | 2913 | status = HTTP_STATUS_UNAUTHORIZED; |
| @@ -2925,7 +2922,7 @@ int html_get_handler(const xs_dict *req, const char *q_path, | |||
| 2925 | } | 2922 | } |
| 2926 | } | 2923 | } |
| 2927 | else | 2924 | else |
| 2928 | if (strcmp(p_path, "list/bookmarks") == 0) { /** list of bookmarked posts **/ | 2925 | if (strcmp(p_path, "bookmarks") == 0) { /** list of bookmarked posts **/ |
| 2929 | if (!login(&snac, req)) { | 2926 | if (!login(&snac, req)) { |
| 2930 | *body = xs_dup(uid); | 2927 | *body = xs_dup(uid); |
| 2931 | status = HTTP_STATUS_UNAUTHORIZED; | 2928 | status = HTTP_STATUS_UNAUTHORIZED; |