diff options
| -rw-r--r-- | html.c | 17 |
1 files changed, 9 insertions, 8 deletions
| @@ -145,7 +145,7 @@ xs_str *html_actor_icon(xs_str *os, char *actor, | |||
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | 147 | ||
| 148 | d_char *html_msg_icon(snac *snac, d_char *os, char *msg) | 148 | xs_str *html_msg_icon(snac *snac, xs_str *os, const xs_dict *msg) |
| 149 | { | 149 | { |
| 150 | char *actor_id; | 150 | char *actor_id; |
| 151 | xs *actor = NULL; | 151 | xs *actor = NULL; |
| @@ -498,10 +498,10 @@ d_char *html_button(d_char *s, char *clss, char *label) | |||
| 498 | } | 498 | } |
| 499 | 499 | ||
| 500 | 500 | ||
| 501 | d_char *build_mentions(snac *snac, char *msg) | 501 | xs_str *build_mentions(snac *snac, const xs_dict *msg) |
| 502 | /* returns a string with the mentions in msg */ | 502 | /* returns a string with the mentions in msg */ |
| 503 | { | 503 | { |
| 504 | d_char *s = xs_str_new(NULL); | 504 | xs_str *s = xs_str_new(NULL); |
| 505 | char *list = xs_dict_get(msg, "tag"); | 505 | char *list = xs_dict_get(msg, "tag"); |
| 506 | char *v; | 506 | char *v; |
| 507 | 507 | ||
| @@ -548,7 +548,7 @@ d_char *build_mentions(snac *snac, char *msg) | |||
| 548 | } | 548 | } |
| 549 | 549 | ||
| 550 | 550 | ||
| 551 | d_char *html_entry_controls(snac *snac, d_char *os, char *msg, const char *md5) | 551 | xs_str *html_entry_controls(snac *snac, xs_str *os, const xs_dict *msg, const char *md5) |
| 552 | { | 552 | { |
| 553 | char *id = xs_dict_get(msg, "id"); | 553 | char *id = xs_dict_get(msg, "id"); |
| 554 | char *actor = xs_dict_get(msg, "attributedTo"); | 554 | char *actor = xs_dict_get(msg, "attributedTo"); |
| @@ -688,7 +688,7 @@ d_char *html_entry_controls(snac *snac, d_char *os, char *msg, const char *md5) | |||
| 688 | } | 688 | } |
| 689 | 689 | ||
| 690 | 690 | ||
| 691 | d_char *html_entry(snac *snac, d_char *os, char *msg, int local, | 691 | xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local, |
| 692 | int level, const char *md5, int hide_children) | 692 | int level, const char *md5, int hide_children) |
| 693 | { | 693 | { |
| 694 | char *id = xs_dict_get(msg, "id"); | 694 | char *id = xs_dict_get(msg, "id"); |
| @@ -1008,10 +1008,11 @@ xs_str *html_user_footer(xs_str *s) | |||
| 1008 | } | 1008 | } |
| 1009 | 1009 | ||
| 1010 | 1010 | ||
| 1011 | d_char *html_timeline(snac *snac, char *list, int local, int skip, int show, int show_more) | 1011 | xs_str *html_timeline(snac *snac, const xs_list *list, int local, int skip, int show, int show_more) |
| 1012 | /* returns the HTML for the timeline */ | 1012 | /* returns the HTML for the timeline */ |
| 1013 | { | 1013 | { |
| 1014 | d_char *s = xs_str_new(NULL); | 1014 | xs_str *s = xs_str_new(NULL); |
| 1015 | xs_list *p = (xs_list *)list; | ||
| 1015 | char *v; | 1016 | char *v; |
| 1016 | double t = ftime(); | 1017 | double t = ftime(); |
| 1017 | 1018 | ||
| @@ -1023,7 +1024,7 @@ d_char *html_timeline(snac *snac, char *list, int local, int skip, int show, int | |||
| 1023 | s = xs_str_cat(s, "<a name=\"snac-posts\"></a>\n"); | 1024 | s = xs_str_cat(s, "<a name=\"snac-posts\"></a>\n"); |
| 1024 | s = xs_str_cat(s, "<div class=\"snac-posts\">\n"); | 1025 | s = xs_str_cat(s, "<div class=\"snac-posts\">\n"); |
| 1025 | 1026 | ||
| 1026 | while (xs_list_iter(&list, &v)) { | 1027 | while (xs_list_iter(&p, &v)) { |
| 1027 | xs *msg = NULL; | 1028 | xs *msg = NULL; |
| 1028 | 1029 | ||
| 1029 | if (!valid_status(timeline_get_by_md5(snac, v, &msg))) | 1030 | if (!valid_status(timeline_get_by_md5(snac, v, &msg))) |