mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 22:45:05 +00:00
Only show the 'in reply to' link if level == 0.
This commit is contained in:
parent
03ed4d5309
commit
5d126d0e9e
1 changed files with 11 additions and 9 deletions
20
html.c
20
html.c
|
@ -702,17 +702,19 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, int local, int level, cons
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (strcmp(type, "Note") == 0) {
|
if (strcmp(type, "Note") == 0) {
|
||||||
/* is the parent not here? */
|
if (level == 0) {
|
||||||
char *parent = xs_dict_get(msg, "inReplyTo");
|
/* is the parent not here? */
|
||||||
|
char *parent = xs_dict_get(msg, "inReplyTo");
|
||||||
|
|
||||||
if (!xs_is_null(parent) && *parent && !timeline_here(snac, parent)) {
|
if (!xs_is_null(parent) && *parent && !timeline_here(snac, parent)) {
|
||||||
xs *s1 = xs_fmt(
|
xs *s1 = xs_fmt(
|
||||||
"<div class=\"snac-origin\">%s "
|
"<div class=\"snac-origin\">%s "
|
||||||
"<a href=\"%s\">»</a></div>\n",
|
"<a href=\"%s\">»</a></div>\n",
|
||||||
L("in reply to"), parent
|
L("in reply to"), parent
|
||||||
);
|
);
|
||||||
|
|
||||||
s = xs_str_cat(s, s1);
|
s = xs_str_cat(s, s1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue