diff options
| author | 2023-02-08 14:07:13 +0100 | |
|---|---|---|
| committer | 2023-02-08 14:07:13 +0100 | |
| commit | 5d126d0e9ed2763fa6db1d533d33069a74db8b0f (patch) | |
| tree | 728f6287e2c5cd31abaf0cd9281f2f836e4e4ea8 /html.c | |
| parent | Updated TODO. (diff) | |
| download | snac2-5d126d0e9ed2763fa6db1d533d33069a74db8b0f.tar.gz snac2-5d126d0e9ed2763fa6db1d533d33069a74db8b0f.tar.xz snac2-5d126d0e9ed2763fa6db1d533d33069a74db8b0f.zip | |
Only show the 'in reply to' link if level == 0.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 20 |
1 files changed, 11 insertions, 9 deletions
| @@ -702,17 +702,19 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, int local, int level, cons | |||
| 702 | } | 702 | } |
| 703 | else | 703 | else |
| 704 | if (strcmp(type, "Note") == 0) { | 704 | if (strcmp(type, "Note") == 0) { |
| 705 | /* is the parent not here? */ | 705 | if (level == 0) { |
| 706 | char *parent = xs_dict_get(msg, "inReplyTo"); | 706 | /* is the parent not here? */ |
| 707 | char *parent = xs_dict_get(msg, "inReplyTo"); | ||
| 707 | 708 | ||
| 708 | if (!xs_is_null(parent) && *parent && !timeline_here(snac, parent)) { | 709 | if (!xs_is_null(parent) && *parent && !timeline_here(snac, parent)) { |
| 709 | xs *s1 = xs_fmt( | 710 | xs *s1 = xs_fmt( |
| 710 | "<div class=\"snac-origin\">%s " | 711 | "<div class=\"snac-origin\">%s " |
| 711 | "<a href=\"%s\">»</a></div>\n", | 712 | "<a href=\"%s\">»</a></div>\n", |
| 712 | L("in reply to"), parent | 713 | L("in reply to"), parent |
| 713 | ); | 714 | ); |
| 714 | 715 | ||
| 715 | s = xs_str_cat(s, s1); | 716 | s = xs_str_cat(s, s1); |
| 717 | } | ||
| 716 | } | 718 | } |
| 717 | } | 719 | } |
| 718 | 720 | ||