diff options
| author | 2025-05-27 21:14:23 +0200 | |
|---|---|---|
| committer | 2025-05-27 21:14:23 +0200 | |
| commit | 5bc451159420d5d51a507fda82a623069cfae92b (patch) | |
| tree | 725767368e77caa9751d39778b046b5ad00e4806 /html.c | |
| parent | Renamed timeline_here() to timeline_here_by_md5(), as it always should have b... (diff) | |
| download | snac2-5bc451159420d5d51a507fda82a623069cfae92b.tar.gz snac2-5bc451159420d5d51a507fda82a623069cfae92b.tar.xz snac2-5bc451159420d5d51a507fda82a623069cfae92b.zip | |
New function timeline_here().
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 8 |
1 files changed, 2 insertions, 6 deletions
| @@ -2115,9 +2115,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 2115 | const char *parent = get_in_reply_to(msg); | 2115 | const char *parent = get_in_reply_to(msg); |
| 2116 | 2116 | ||
| 2117 | if (!xs_is_null(parent) && *parent) { | 2117 | if (!xs_is_null(parent) && *parent) { |
| 2118 | xs *md5 = xs_md5_hex(parent, strlen(parent)); | 2118 | if (!timeline_here(user, parent)) { |
| 2119 | |||
| 2120 | if (!timeline_here_by_md5(user, md5)) { | ||
| 2121 | xs_html_add(post_header, | 2119 | xs_html_add(post_header, |
| 2122 | xs_html_tag("div", | 2120 | xs_html_tag("div", |
| 2123 | xs_html_attr("class", "snac-origin"), | 2121 | xs_html_attr("class", "snac-origin"), |
| @@ -3773,9 +3771,7 @@ int html_get_handler(const xs_dict *req, const char *q_path, | |||
| 3773 | q = url_acct; | 3771 | q = url_acct; |
| 3774 | 3772 | ||
| 3775 | /* add the post to the timeline */ | 3773 | /* add the post to the timeline */ |
| 3776 | xs *md5 = xs_md5_hex(q, strlen(q)); | 3774 | if (!timeline_here(&snac, q)) |
| 3777 | |||
| 3778 | if (!timeline_here_by_md5(&snac, md5)) | ||
| 3779 | timeline_add(&snac, q, object); | 3775 | timeline_add(&snac, q, object); |
| 3780 | } | 3776 | } |
| 3781 | } | 3777 | } |