diff options
| author | grunfink <grunfink@comam.es> | 2026-02-14 05:42:45 +0100 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2026-02-14 05:42:45 +0100 |
| commit | ebcdb748659407fd9038ada847e065cabe950a16 (patch) | |
| tree | 4005474aceffbc552f3904256e1547c189c47f99 | |
| parent | 01c412dd810017f6acede3ca962cc3afe7181dc9 (diff) | |
Use the 'url' link instead of 'id' (if there is one) in html_actor_icon().
| -rw-r--r-- | html.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -274,6 +274,7 @@ xs_html *html_actor_icon(snac *user, xs_dict *actor, const char *date, avatar = xs_fmt("data:image/png;base64, %s", default_avatar_base64()); const char *actor_id = xs_dict_get(actor, "id"); + const char *html_url = xs_dict_get_def(actor, "url", actor_id); xs *href = NULL; if (user) { @@ -287,7 +288,7 @@ xs_html *html_actor_icon(snac *user, xs_dict *actor, const char *date, } if (href == NULL) - href = xs_dup(actor_id); + href = xs_dup(html_url); xs_html *name_link = xs_html_tag("a", xs_html_attr("href", href), @@ -453,7 +454,7 @@ xs_html *html_actor_icon(snac *user, xs_dict *actor, const char *date, xs_html_add(actor_icon, xs_html_sctag("br", NULL), xs_html_tag("a", - xs_html_attr("href", xs_dict_get(actor, "id")), + xs_html_attr("href", html_url), xs_html_attr("class", "p-author-tag h-card snac-author-tag"), xs_html_text(user))); } |