aboutsummaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/html.c b/html.c
index 36b416d..6dbb05e 100644
--- a/html.c
+++ b/html.c
@@ -275,6 +275,13 @@ xs_html *html_actor_icon(snac *user, xs_dict *actor, const char *date,
const char *actor_id = xs_dict_get(actor, "id");
const char *html_url = xs_dict_get_def(actor, "url", actor_id);
+
+ if (xs_is_list(html_url))
+ html_url = xs_list_get(html_url, 0);
+
+ if (!xs_is_string(html_url))
+ html_url = actor_id;
+
xs *href = NULL;
if (user) {