commit 0f0e33f
default
·
2025-01-22 14:47:21 +0000 UTC
parent ced28f9
Fixed bug in 'in reply to' checking.
1 files changed,
+14,
-10
M
html.c
M
html.c
+14,
-10
1@@ -1856,19 +1856,23 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
2 }
3 }
4
5- if (strcmp(type, "Note") == 0) {
6+ if (user && strcmp(type, "Note") == 0) {
7 /* is the parent not here? */
8 const char *parent = get_in_reply_to(msg);
9
10- if (user && !xs_is_null(parent) && *parent && !timeline_here(user, parent)) {
11- xs_html_add(post_header,
12- xs_html_tag("div",
13- xs_html_attr("class", "snac-origin"),
14- xs_html_text(L("in reply to")),
15- xs_html_text(" "),
16- xs_html_tag("a",
17- xs_html_attr("href", parent),
18- xs_html_text("»"))));
19+ if (!xs_is_null(parent) && *parent) {
20+ xs *md5 = xs_md5_hex(parent, strlen(parent));
21+
22+ if (!timeline_here(user, md5)) {
23+ xs_html_add(post_header,
24+ xs_html_tag("div",
25+ xs_html_attr("class", "snac-origin"),
26+ xs_html_text(L("in reply to")),
27+ xs_html_text(" "),
28+ xs_html_tag("a",
29+ xs_html_attr("href", parent),
30+ xs_html_text("»"))));
31+ }
32 }
33 }
34