diff --git a/html.c b/html.c index 1e7788d..8160b4e 100644 --- a/html.c +++ b/html.c @@ -370,16 +370,37 @@ d_char *html_top_controls(snac *snac, d_char *s) } +d_char *html_entry(snac *snac, d_char *s, char *msg, xs_set *seen, int level) +{ + char *id = xs_dict_get(msg, "id"); + + /* return if already seen */ + if (xs_set_add(seen, id) == 0) + return s; + + return s; +} + + d_char *html_timeline(snac *snac, char *list, int local) /* returns the HTML for the timeline */ { d_char *s = xs_str_new(NULL); + xs_set *seen = xs_set_new(4096); + char *v; s = html_user_header(snac, s, local); if (!local) s = html_top_controls(snac, s); + while (xs_list_iter(&list, &v)) { + xs *msg = timeline_get(snac, v); + + s = html_entry(snac, s, msg, seen, 0); + } + +#if 0 s = xs_str_cat(s, "