diff options
| author | 2025-01-22 15:47:21 +0100 | |
|---|---|---|
| committer | 2025-01-22 15:47:21 +0100 | |
| commit | 0f0e33f5f6f49b9b4055b24761559b11c80da45e (patch) | |
| tree | 9cd7fee44cc295af43c921d349f4884ee29d8cb5 /html.c | |
| parent | Updated documentation. (diff) | |
| download | penes-snac2-0f0e33f5f6f49b9b4055b24761559b11c80da45e.tar.gz penes-snac2-0f0e33f5f6f49b9b4055b24761559b11c80da45e.tar.xz penes-snac2-0f0e33f5f6f49b9b4055b24761559b11c80da45e.zip | |
Fixed bug in 'in reply to' checking.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 24 |
1 files changed, 14 insertions, 10 deletions
| @@ -1856,19 +1856,23 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 1856 | } | 1856 | } |
| 1857 | } | 1857 | } |
| 1858 | 1858 | ||
| 1859 | if (strcmp(type, "Note") == 0) { | 1859 | if (user && strcmp(type, "Note") == 0) { |
| 1860 | /* is the parent not here? */ | 1860 | /* is the parent not here? */ |
| 1861 | const char *parent = get_in_reply_to(msg); | 1861 | const char *parent = get_in_reply_to(msg); |
| 1862 | 1862 | ||
| 1863 | if (user && !xs_is_null(parent) && *parent && !timeline_here(user, parent)) { | 1863 | if (!xs_is_null(parent) && *parent) { |
| 1864 | xs_html_add(post_header, | 1864 | xs *md5 = xs_md5_hex(parent, strlen(parent)); |
| 1865 | xs_html_tag("div", | 1865 | |
| 1866 | xs_html_attr("class", "snac-origin"), | 1866 | if (!timeline_here(user, md5)) { |
| 1867 | xs_html_text(L("in reply to")), | 1867 | xs_html_add(post_header, |
| 1868 | xs_html_text(" "), | 1868 | xs_html_tag("div", |
| 1869 | xs_html_tag("a", | 1869 | xs_html_attr("class", "snac-origin"), |
| 1870 | xs_html_attr("href", parent), | 1870 | xs_html_text(L("in reply to")), |
| 1871 | xs_html_text("»")))); | 1871 | xs_html_text(" "), |
| 1872 | xs_html_tag("a", | ||
| 1873 | xs_html_attr("href", parent), | ||
| 1874 | xs_html_text("»")))); | ||
| 1875 | } | ||
| 1872 | } | 1876 | } |
| 1873 | } | 1877 | } |
| 1874 | 1878 | ||