summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar grunfink2026-02-24 08:19:39 +0100
committerGravatar grunfink2026-02-24 08:19:39 +0100
commite5cf9581be6d81bd49a50c310b6bf758bd868f43 (patch)
tree51e2b4d567f31765318e1b30247a15933c499045
parentUpdated RELEASE_NOTES. (diff)
downloadsnac2-e5cf9581be6d81bd49a50c310b6bf758bd868f43.tar.gz
snac2-e5cf9581be6d81bd49a50c310b6bf758bd868f43.tar.xz
snac2-e5cf9581be6d81bd49a50c310b6bf758bd868f43.zip
Also use the 'url' field in the ยป link to the post.
-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,
483 const char *type = xs_dict_get(msg, "type"); 483 const char *type = xs_dict_get(msg, "type");
484 const int scope = get_msg_visibility(msg); 484 const int scope = get_msg_visibility(msg);
485 485
486 if (xs_match(type, POSTLIKE_OBJECT_TYPE)) 486 if (xs_match(type, POSTLIKE_OBJECT_TYPE)) {
487 url = xs_dict_get(msg, "id"); 487 url = xs_dict_get(msg, "url");
488 if (xs_is_list(url))
489 url = xs_list_get(url, 0);
488 490
491 if (!xs_is_string(url))
492 url = xs_dict_get(msg, "id");
493 }
489 494
490 date = xs_dict_get(msg, "published"); 495 date = xs_dict_get(msg, "published");
491 udate = xs_dict_get(msg, "updated"); 496 udate = xs_dict_get(msg, "updated");