From cac8eba5203055178a92511b386f57349bcca506 Mon Sep 17 00:00:00 2001 From: default Date: Mon, 27 Nov 2023 10:27:28 +0100 Subject: html_msg_icon() is full xs_html. --- html.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'html.c') diff --git a/html.c b/html.c index 1bbd153..1d540ca 100644 --- a/html.c +++ b/html.c @@ -200,10 +200,11 @@ xs_html *html_actor_icon(xs_dict *actor, const char *date, } -xs_str *html_msg_icon(xs_str *os, const xs_dict *msg) +xs_html *html_msg_icon(const xs_dict *msg) { char *actor_id; xs *actor = NULL; + xs_html *actor_icon = NULL; if ((actor_id = xs_dict_get(msg, "attributedTo")) == NULL) actor_id = xs_dict_get(msg, "actor"); @@ -223,12 +224,10 @@ xs_str *html_msg_icon(xs_str *os, const xs_dict *msg) date = xs_dict_get(msg, "published"); udate = xs_dict_get(msg, "updated"); - xs_html *actor_icon = html_actor_icon(actor, date, udate, url, priv); - xs *s1 = xs_html_render(actor_icon); - os = xs_str_cat(os, s1); + actor_icon = html_actor_icon(actor, date, udate, url, priv); } - return os; + return actor_icon; } @@ -1180,16 +1179,17 @@ xs_str *html_entry(snac *user, xs_str *os, const xs_dict *msg, int local, } if (strcmp(type, "Follow") == 0) { - s = xs_str_cat(s, "