diff options
| author | 2026-02-14 05:42:45 +0100 | |
|---|---|---|
| committer | 2026-02-14 05:42:45 +0100 | |
| commit | ebcdb748659407fd9038ada847e065cabe950a16 (patch) | |
| tree | 4005474aceffbc552f3904256e1547c189c47f99 /html.c | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | snac2-ebcdb748659407fd9038ada847e065cabe950a16.tar.gz snac2-ebcdb748659407fd9038ada847e065cabe950a16.tar.xz snac2-ebcdb748659407fd9038ada847e065cabe950a16.zip | |
Use the 'url' link instead of 'id' (if there is one) in html_actor_icon().
Diffstat (limited to 'html.c')
| -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, | |||
| 274 | avatar = xs_fmt("data:image/png;base64, %s", default_avatar_base64()); | 274 | avatar = xs_fmt("data:image/png;base64, %s", default_avatar_base64()); |
| 275 | 275 | ||
| 276 | const char *actor_id = xs_dict_get(actor, "id"); | 276 | const char *actor_id = xs_dict_get(actor, "id"); |
| 277 | const char *html_url = xs_dict_get_def(actor, "url", actor_id); | ||
| 277 | xs *href = NULL; | 278 | xs *href = NULL; |
| 278 | 279 | ||
| 279 | if (user) { | 280 | if (user) { |
| @@ -287,7 +288,7 @@ xs_html *html_actor_icon(snac *user, xs_dict *actor, const char *date, | |||
| 287 | } | 288 | } |
| 288 | 289 | ||
| 289 | if (href == NULL) | 290 | if (href == NULL) |
| 290 | href = xs_dup(actor_id); | 291 | href = xs_dup(html_url); |
| 291 | 292 | ||
| 292 | xs_html *name_link = xs_html_tag("a", | 293 | xs_html *name_link = xs_html_tag("a", |
| 293 | xs_html_attr("href", href), | 294 | xs_html_attr("href", href), |
| @@ -453,7 +454,7 @@ xs_html *html_actor_icon(snac *user, xs_dict *actor, const char *date, | |||
| 453 | xs_html_add(actor_icon, | 454 | xs_html_add(actor_icon, |
| 454 | xs_html_sctag("br", NULL), | 455 | xs_html_sctag("br", NULL), |
| 455 | xs_html_tag("a", | 456 | xs_html_tag("a", |
| 456 | xs_html_attr("href", xs_dict_get(actor, "id")), | 457 | xs_html_attr("href", html_url), |
| 457 | xs_html_attr("class", "p-author-tag h-card snac-author-tag"), | 458 | xs_html_attr("class", "p-author-tag h-card snac-author-tag"), |
| 458 | xs_html_text(user))); | 459 | xs_html_text(user))); |
| 459 | } | 460 | } |