commit 5d126d0
default
·
2023-02-08 13:07:13 +0000 UTC
parent 03ed4d5
Only show the 'in reply to' link if level == 0.
1 files changed,
+11,
-9
M
html.c
M
html.c
+11,
-9
1@@ -702,17 +702,19 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, int local, int level, cons
2 }
3 else
4 if (strcmp(type, "Note") == 0) {
5- /* is the parent not here? */
6- char *parent = xs_dict_get(msg, "inReplyTo");
7+ if (level == 0) {
8+ /* is the parent not here? */
9+ char *parent = xs_dict_get(msg, "inReplyTo");
10
11- if (!xs_is_null(parent) && *parent && !timeline_here(snac, parent)) {
12- xs *s1 = xs_fmt(
13- "<div class=\"snac-origin\">%s "
14- "<a href=\"%s\">»</a></div>\n",
15- L("in reply to"), parent
16- );
17+ if (!xs_is_null(parent) && *parent && !timeline_here(snac, parent)) {
18+ xs *s1 = xs_fmt(
19+ "<div class=\"snac-origin\">%s "
20+ "<a href=\"%s\">»</a></div>\n",
21+ L("in reply to"), parent
22+ );
23
24- s = xs_str_cat(s, s1);
25+ s = xs_str_cat(s, s1);
26+ }
27 }
28 }
29