mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 05:15:04 +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
|
||||
if (strcmp(type, "Note") == 0) {
|
||||
/* is the parent not here? */
|
||||
char *parent = xs_dict_get(msg, "inReplyTo");
|
||||
if (level == 0) {
|
||||
/* is the parent not here? */
|
||||
char *parent = xs_dict_get(msg, "inReplyTo");
|
||||
|
||||
if (!xs_is_null(parent) && *parent && !timeline_here(snac, parent)) {
|
||||
xs *s1 = xs_fmt(
|
||||
"<div class=\"snac-origin\">%s "
|
||||
"<a href=\"%s\">»</a></div>\n",
|
||||
L("in reply to"), parent
|
||||
);
|
||||
if (!xs_is_null(parent) && *parent && !timeline_here(snac, parent)) {
|
||||
xs *s1 = xs_fmt(
|
||||
"<div class=\"snac-origin\">%s "
|
||||
"<a href=\"%s\">»</a></div>\n",
|
||||
L("in reply to"), parent
|
||||
);
|
||||
|
||||
s = xs_str_cat(s, s1);
|
||||
s = xs_str_cat(s, s1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue