commit bad9f3a
default
·
2023-02-05 16:39:40 +0000 UTC
parent 12aedfa
Renamed timeline_get() to timeline_get_by_md5(), as that is what id does.
M
data.c
+2,
-2
1@@ -824,10 +824,10 @@ double timeline_mtime(snac *snac)
2 }
3
4
5-int timeline_get(snac *snac, const char *id, xs_dict **msg)
6+int timeline_get_by_md5(snac *snac, const char *md5, xs_dict **msg)
7 /* gets a message from the timeline */
8 {
9- return object_get_by_md5(id, msg, NULL);
10+ return object_get_by_md5(md5, msg, NULL);
11 }
12
13
M
html.c
+3,
-3
1@@ -830,7 +830,7 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, int local, int level, cons
2 p = children;
3 while (xs_list_iter(&p, &cmd5)) {
4 xs *chd = NULL;
5- object_get_by_md5(cmd5, &chd, NULL);
6+ timeline_get_by_md5(snac, cmd5, &chd);
7
8 if (older_open && left <= 3) {
9 ss = xs_str_cat(ss, "</details>\n");
10@@ -895,7 +895,7 @@ d_char *html_timeline(snac *snac, char *list, int local, int skip, int show, int
11 while (xs_list_iter(&list, &v)) {
12 xs *msg = NULL;
13
14- if (!valid_status(object_get_by_md5(v, &msg, NULL)))
15+ if (!valid_status(timeline_get_by_md5(snac, v, &msg)))
16 continue;
17
18 s = html_entry(snac, s, msg, local, 0, v);
19@@ -1256,7 +1256,7 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
20 while (xs_list_iter(&p, &v)) {
21 xs *msg = NULL;
22
23- if (!valid_status(timeline_get(&snac, v, &msg)))
24+ if (!valid_status(timeline_get_by_md5(&snac, v, &msg)))
25 continue;
26
27 char *id = xs_dict_get(msg, "id");
M
snac.h
+1,
-1
1@@ -88,7 +88,7 @@ int follower_check(snac *snac, const char *actor);
2 d_char *follower_list(snac *snac);
3
4 double timeline_mtime(snac *snac);
5-int timeline_get(snac *snac, const char *id, xs_dict **msg);
6+int timeline_get_by_md5(snac *snac, const char *md5, xs_dict **msg);
7 int timeline_del(snac *snac, char *id);
8 d_char *timeline_simple_list(snac *snac, const char *idx_name, int skip, int show);
9 d_char *timeline_list(snac *snac, const char *idx_name, int skip, int show);