commit 631e44a
grunfink
·
2025-05-27 19:08:57 +0000 UTC
parent 36d44dd
Renamed timeline_here() to timeline_here_by_md5(), as it always should have been.
5 files changed,
+8,
-8
M
data.c
+2,
-2
1@@ -1391,7 +1391,7 @@ xs_str *timeline_fn_by_md5(snac *snac, const char *md5)
2 }
3
4
5-int timeline_here(snac *snac, const char *md5)
6+int timeline_here_by_md5(snac *snac, const char *md5)
7 /* checks if an object is in the user cache */
8 {
9 xs *fn = timeline_fn_by_md5(snac, md5);
10@@ -1515,7 +1515,7 @@ xs_list *timeline_top_level(snac *snac, const xs_list *list)
11 break;
12
13 /* well, there is a parent... but is it here? */
14- if (!timeline_here(snac, line2))
15+ if (!timeline_here_by_md5(snac, line2))
16 break;
17
18 /* it's here! try again with its own parent */
M
html.c
+3,
-3
1@@ -2117,7 +2117,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
2 if (!xs_is_null(parent) && *parent) {
3 xs *md5 = xs_md5_hex(parent, strlen(parent));
4
5- if (!timeline_here(user, md5)) {
6+ if (!timeline_here_by_md5(user, md5)) {
7 xs_html_add(post_header,
8 xs_html_tag("div",
9 xs_html_attr("class", "snac-origin"),
10@@ -3775,7 +3775,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
11 /* add the post to the timeline */
12 xs *md5 = xs_md5_hex(q, strlen(q));
13
14- if (!timeline_here(&snac, md5))
15+ if (!timeline_here_by_md5(&snac, md5))
16 timeline_add(&snac, q, object);
17 }
18 }
19@@ -3917,7 +3917,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
20 xs *l = xs_split(p_path, "/");
21 const char *md5 = xs_list_get(l, -1);
22
23- if (md5 && *md5 && timeline_here(&snac, md5)) {
24+ if (md5 && *md5 && timeline_here_by_md5(&snac, md5)) {
25 xs *list0 = xs_list_append(xs_list_new(), md5);
26 xs *list = timeline_top_level(&snac, list0);
27
M
main.c
+1,
-1
1@@ -695,7 +695,7 @@ int main(int argc, char *argv[])
2 xs_json_dump(data, 4, stdout);
3 enqueue_actor_refresh(&snac, xs_dict_get(data, "attributedTo"), 0);
4
5- if (!timeline_here(&snac, url))
6+ if (!timeline_here_by_md5(&snac, url))
7 timeline_add(&snac, url, data);
8 else
9 printf("Post %s already here\n", url);
+1,
-1
1@@ -2510,7 +2510,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
2 if (xs_startswith(q, "https://")) {
3 xs *md5 = xs_md5_hex(q, strlen(q));
4
5- if (!timeline_here(&snac1, md5)) {
6+ if (!timeline_here_by_md5(&snac1, md5)) {
7 xs *object = NULL;
8 int status;
9
M
snac.h
+1,
-1
1@@ -164,7 +164,7 @@ int pending_count(snac *user);
2
3 double timeline_mtime(snac *snac);
4 int timeline_touch(snac *snac);
5-int timeline_here(snac *snac, const char *md5);
6+int timeline_here_by_md5(snac *snac, const char *md5);
7 int timeline_get_by_md5(snac *snac, const char *md5, xs_dict **msg);
8 int timeline_del(snac *snac, const char *id);
9 xs_str *user_index_fn(snac *user, const char *idx_name);