diff options
| author | grunfink <grunfink@comam.es> | 2026-02-24 08:19:39 +0100 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2026-02-24 08:19:39 +0100 |
| commit | e5cf9581be6d81bd49a50c310b6bf758bd868f43 (patch) | |
| tree | 51e2b4d567f31765318e1b30247a15933c499045 /html.c | |
| parent | 97901eb77476b88d9f21a7051aacc41fe0cac45d (diff) | |
Also use the 'url' field in the » link to the post.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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"); |