diff --git a/html.c b/html.c index 3286b04..e1df7e9 100644 --- a/html.c +++ b/html.c @@ -1886,7 +1886,8 @@ xs_html *html_footer(void) xs_str *html_timeline(snac *user, const xs_list *list, int read_only, - int skip, int show, int show_more, char *tag, char *page) + int skip, int show, int show_more, + char *tag, char *page, int utl) /* returns the HTML for the timeline */ { xs_list *p = (xs_list *)list; @@ -1938,7 +1939,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only, xs *msg = NULL; int status; - if (user && !is_pinned_by_md5(user, v)) + if (utl && user && !is_pinned_by_md5(user, v)) status = timeline_get_by_md5(user, v, &msg); else status = object_get_by_md5(v, &msg); @@ -2412,7 +2413,7 @@ int html_get_handler(const xs_dict *req, const char *q_path, if (xs_type(xs_dict_get(snac.config, "private")) == XSTYPE_TRUE) { /** empty public timeline for private users **/ - *body = html_timeline(&snac, NULL, 1, 0, 0, 0, NULL, ""); + *body = html_timeline(&snac, NULL, 1, 0, 0, 0, NULL, "", 1); *b_size = strlen(*body); status = 200; } @@ -2430,7 +2431,7 @@ int html_get_handler(const xs_dict *req, const char *q_path, xs *pins = pinned_list(&snac); pins = xs_list_cat(pins, list); - *body = html_timeline(&snac, pins, 1, skip, show, xs_list_len(next), NULL, ""); + *body = html_timeline(&snac, pins, 1, skip, show, xs_list_len(next), NULL, "", 1); *b_size = strlen(*body); status = 200; @@ -2467,7 +2468,8 @@ int html_get_handler(const xs_dict *req, const char *q_path, xs *pins = pinned_list(&snac); pins = xs_list_cat(pins, list); - *body = html_timeline(&snac, pins, 0, skip, show, xs_list_len(next), NULL, "/admin"); + *body = html_timeline(&snac, pins, 0, skip, show, + xs_list_len(next), NULL, "/admin", 1); *b_size = strlen(*body); status = 200; @@ -2511,7 +2513,8 @@ int html_get_handler(const xs_dict *req, const char *q_path, xs *list = timeline_instance_list(skip, show); xs *next = timeline_instance_list(skip + show, 1); - *body = html_timeline(&snac, list, 0, skip, show, xs_list_len(next), NULL, "/instance"); + *body = html_timeline(&snac, list, 0, skip, show, + xs_list_len(next), NULL, "/instance", 0); *b_size = strlen(*body); status = 200; } @@ -2530,7 +2533,7 @@ int html_get_handler(const xs_dict *req, const char *q_path, list = xs_list_append(list, md5); - *body = html_timeline(&snac, list, 1, 0, 0, 0, NULL, ""); + *body = html_timeline(&snac, list, 1, 0, 0, 0, NULL, "", 1); *b_size = strlen(*body); status = 200; } diff --git a/httpd.c b/httpd.c index d10c675..319a7b3 100644 --- a/httpd.c +++ b/httpd.c @@ -195,13 +195,13 @@ int server_get_handler(xs_dict *req, const char *q_path, more = 1; } - *body = html_timeline(NULL, tl, 0, skip, show, more, t, NULL); + *body = html_timeline(NULL, tl, 0, skip, show, more, t, NULL, 0); } else if (xs_type(xs_dict_get(srv_config, "show_instance_timeline")) == XSTYPE_TRUE) { /** instance timeline **/ xs *tl = timeline_instance_list(0, 30); - *body = html_timeline(NULL, tl, 0, 0, 0, 0, NULL, NULL); + *body = html_timeline(NULL, tl, 0, 0, 0, 0, NULL, NULL, 0); } else *body = greeting_html(); diff --git a/snac.h b/snac.h index b95e4e1..85f8b44 100644 --- a/snac.h +++ b/snac.h @@ -297,7 +297,8 @@ xs_str *sanitize(const char *content); xs_str *encode_html(const char *str); xs_str *html_timeline(snac *user, const xs_list *list, int read_only, - int skip, int show, int show_more, char *tag, char *page); + int skip, int show, int show_more, + char *tag, char *page, int utl); int html_get_handler(const xs_dict *req, const char *q_path, char **body, int *b_size, char **ctype, xs_str **etag);