diff options
| author | 2025-05-27 21:08:57 +0200 | |
|---|---|---|
| committer | 2025-05-27 21:08:57 +0200 | |
| commit | 631e44a64a20741b5e4716bf75caf7fa743fef82 (patch) | |
| tree | aa16d9443c75b81dd181b01cc136bb21d1476acd | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | penes-snac2-631e44a64a20741b5e4716bf75caf7fa743fef82.tar.gz penes-snac2-631e44a64a20741b5e4716bf75caf7fa743fef82.tar.xz penes-snac2-631e44a64a20741b5e4716bf75caf7fa743fef82.zip | |
Renamed timeline_here() to timeline_here_by_md5(), as it always should have been.
| -rw-r--r-- | data.c | 4 | ||||
| -rw-r--r-- | html.c | 6 | ||||
| -rw-r--r-- | main.c | 2 | ||||
| -rw-r--r-- | mastoapi.c | 2 | ||||
| -rw-r--r-- | snac.h | 2 |
5 files changed, 8 insertions, 8 deletions
| @@ -1391,7 +1391,7 @@ xs_str *timeline_fn_by_md5(snac *snac, const char *md5) | |||
| 1391 | } | 1391 | } |
| 1392 | 1392 | ||
| 1393 | 1393 | ||
| 1394 | int timeline_here(snac *snac, const char *md5) | 1394 | int timeline_here_by_md5(snac *snac, const char *md5) |
| 1395 | /* checks if an object is in the user cache */ | 1395 | /* checks if an object is in the user cache */ |
| 1396 | { | 1396 | { |
| 1397 | xs *fn = timeline_fn_by_md5(snac, md5); | 1397 | xs *fn = timeline_fn_by_md5(snac, md5); |
| @@ -1515,7 +1515,7 @@ xs_list *timeline_top_level(snac *snac, const xs_list *list) | |||
| 1515 | break; | 1515 | break; |
| 1516 | 1516 | ||
| 1517 | /* well, there is a parent... but is it here? */ | 1517 | /* well, there is a parent... but is it here? */ |
| 1518 | if (!timeline_here(snac, line2)) | 1518 | if (!timeline_here_by_md5(snac, line2)) |
| 1519 | break; | 1519 | break; |
| 1520 | 1520 | ||
| 1521 | /* it's here! try again with its own parent */ | 1521 | /* it's here! try again with its own parent */ |
| @@ -2117,7 +2117,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 2117 | if (!xs_is_null(parent) && *parent) { | 2117 | if (!xs_is_null(parent) && *parent) { |
| 2118 | xs *md5 = xs_md5_hex(parent, strlen(parent)); | 2118 | xs *md5 = xs_md5_hex(parent, strlen(parent)); |
| 2119 | 2119 | ||
| 2120 | if (!timeline_here(user, md5)) { | 2120 | if (!timeline_here_by_md5(user, md5)) { |
| 2121 | xs_html_add(post_header, | 2121 | xs_html_add(post_header, |
| 2122 | xs_html_tag("div", | 2122 | xs_html_tag("div", |
| 2123 | xs_html_attr("class", "snac-origin"), | 2123 | xs_html_attr("class", "snac-origin"), |
| @@ -3775,7 +3775,7 @@ int html_get_handler(const xs_dict *req, const char *q_path, | |||
| 3775 | /* add the post to the timeline */ | 3775 | /* add the post to the timeline */ |
| 3776 | xs *md5 = xs_md5_hex(q, strlen(q)); | 3776 | xs *md5 = xs_md5_hex(q, strlen(q)); |
| 3777 | 3777 | ||
| 3778 | if (!timeline_here(&snac, md5)) | 3778 | if (!timeline_here_by_md5(&snac, md5)) |
| 3779 | timeline_add(&snac, q, object); | 3779 | timeline_add(&snac, q, object); |
| 3780 | } | 3780 | } |
| 3781 | } | 3781 | } |
| @@ -3917,7 +3917,7 @@ int html_get_handler(const xs_dict *req, const char *q_path, | |||
| 3917 | xs *l = xs_split(p_path, "/"); | 3917 | xs *l = xs_split(p_path, "/"); |
| 3918 | const char *md5 = xs_list_get(l, -1); | 3918 | const char *md5 = xs_list_get(l, -1); |
| 3919 | 3919 | ||
| 3920 | if (md5 && *md5 && timeline_here(&snac, md5)) { | 3920 | if (md5 && *md5 && timeline_here_by_md5(&snac, md5)) { |
| 3921 | xs *list0 = xs_list_append(xs_list_new(), md5); | 3921 | xs *list0 = xs_list_append(xs_list_new(), md5); |
| 3922 | xs *list = timeline_top_level(&snac, list0); | 3922 | xs *list = timeline_top_level(&snac, list0); |
| 3923 | 3923 | ||
| @@ -695,7 +695,7 @@ int main(int argc, char *argv[]) | |||
| 695 | xs_json_dump(data, 4, stdout); | 695 | xs_json_dump(data, 4, stdout); |
| 696 | enqueue_actor_refresh(&snac, xs_dict_get(data, "attributedTo"), 0); | 696 | enqueue_actor_refresh(&snac, xs_dict_get(data, "attributedTo"), 0); |
| 697 | 697 | ||
| 698 | if (!timeline_here(&snac, url)) | 698 | if (!timeline_here_by_md5(&snac, url)) |
| 699 | timeline_add(&snac, url, data); | 699 | timeline_add(&snac, url, data); |
| 700 | else | 700 | else |
| 701 | printf("Post %s already here\n", url); | 701 | printf("Post %s already here\n", url); |
| @@ -2510,7 +2510,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, | |||
| 2510 | if (xs_startswith(q, "https://")) { | 2510 | if (xs_startswith(q, "https://")) { |
| 2511 | xs *md5 = xs_md5_hex(q, strlen(q)); | 2511 | xs *md5 = xs_md5_hex(q, strlen(q)); |
| 2512 | 2512 | ||
| 2513 | if (!timeline_here(&snac1, md5)) { | 2513 | if (!timeline_here_by_md5(&snac1, md5)) { |
| 2514 | xs *object = NULL; | 2514 | xs *object = NULL; |
| 2515 | int status; | 2515 | int status; |
| 2516 | 2516 | ||
| @@ -164,7 +164,7 @@ int pending_count(snac *user); | |||
| 164 | 164 | ||
| 165 | double timeline_mtime(snac *snac); | 165 | double timeline_mtime(snac *snac); |
| 166 | int timeline_touch(snac *snac); | 166 | int timeline_touch(snac *snac); |
| 167 | int timeline_here(snac *snac, const char *md5); | 167 | int timeline_here_by_md5(snac *snac, const char *md5); |
| 168 | int timeline_get_by_md5(snac *snac, const char *md5, xs_dict **msg); | 168 | int timeline_get_by_md5(snac *snac, const char *md5, xs_dict **msg); |
| 169 | int timeline_del(snac *snac, const char *id); | 169 | int timeline_del(snac *snac, const char *id); |
| 170 | xs_str *user_index_fn(snac *user, const char *idx_name); | 170 | xs_str *user_index_fn(snac *user, const char *idx_name); |