diff options
| author | 2026-02-24 08:19:39 +0100 | |
|---|---|---|
| committer | 2026-02-24 08:19:39 +0100 | |
| commit | e5cf9581be6d81bd49a50c310b6bf758bd868f43 (patch) | |
| tree | 51e2b4d567f31765318e1b30247a15933c499045 /html.c | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | snac2-e5cf9581be6d81bd49a50c310b6bf758bd868f43.tar.gz snac2-e5cf9581be6d81bd49a50c310b6bf758bd868f43.tar.xz snac2-e5cf9581be6d81bd49a50c310b6bf758bd868f43.zip | |
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, | |||
| 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"); |