aboutsummaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2026-02-24 08:19:39 +0100
committergrunfink <grunfink@comam.es>2026-02-24 08:19:39 +0100
commite5cf9581be6d81bd49a50c310b6bf758bd868f43 (patch)
tree51e2b4d567f31765318e1b30247a15933c499045 /html.c
parent97901eb77476b88d9f21a7051aacc41fe0cac45d (diff)
Also use the 'url' field in the » link to the post.
Diffstat (limited to 'html.c')
-rw-r--r--html.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/html.c b/html.c
index 6a86304..033f8cd 100644
--- a/html.c
+++ b/html.c
@@ -483,9 +483,14 @@ xs_html *html_msg_icon(snac *user, const char *actor_id, const xs_dict *msg,
const char *type = xs_dict_get(msg, "type");
const int scope = get_msg_visibility(msg);
- if (xs_match(type, POSTLIKE_OBJECT_TYPE))
- url = xs_dict_get(msg, "id");
+ if (xs_match(type, POSTLIKE_OBJECT_TYPE)) {
+ url = xs_dict_get(msg, "url");
+ if (xs_is_list(url))
+ url = xs_list_get(url, 0);
+ if (!xs_is_string(url))
+ url = xs_dict_get(msg, "id");
+ }
date = xs_dict_get(msg, "published");
udate = xs_dict_get(msg, "updated");