summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data.c4
-rw-r--r--html.c6
-rw-r--r--main.c2
-rw-r--r--mastoapi.c2
-rw-r--r--snac.h2
5 files changed, 8 insertions, 8 deletions
diff --git a/data.c b/data.c
index f45e346..9eada38 100644
--- a/data.c
+++ b/data.c
@@ -1391,7 +1391,7 @@ xs_str *timeline_fn_by_md5(snac *snac, const char *md5)
1391} 1391}
1392 1392
1393 1393
1394int timeline_here(snac *snac, const char *md5) 1394int 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 */
diff --git a/html.c b/html.c
index 83dac0a..4aa0fa4 100644
--- a/html.c
+++ b/html.c
@@ -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
diff --git a/main.c b/main.c
index 80df2d0..9cfbb0d 100644
--- a/main.c
+++ b/main.c
@@ -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);
diff --git a/mastoapi.c b/mastoapi.c
index 9875b12..c88fd1b 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -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
diff --git a/snac.h b/snac.h
index 841c41e..621ab8a 100644
--- a/snac.h
+++ b/snac.h
@@ -164,7 +164,7 @@ int pending_count(snac *user);
164 164
165double timeline_mtime(snac *snac); 165double timeline_mtime(snac *snac);
166int timeline_touch(snac *snac); 166int timeline_touch(snac *snac);
167int timeline_here(snac *snac, const char *md5); 167int timeline_here_by_md5(snac *snac, const char *md5);
168int timeline_get_by_md5(snac *snac, const char *md5, xs_dict **msg); 168int timeline_get_by_md5(snac *snac, const char *md5, xs_dict **msg);
169int timeline_del(snac *snac, const char *id); 169int timeline_del(snac *snac, const char *id);
170xs_str *user_index_fn(snac *user, const char *idx_name); 170xs_str *user_index_fn(snac *user, const char *idx_name);