mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 14:35:04 +00:00
Renamed timeline_get() to timeline_get_by_md5(), as that is what id does.
This commit is contained in:
parent
12aedfadfd
commit
bad9f3a8c6
3 changed files with 6 additions and 6 deletions
4
data.c
4
data.c
|
@ -824,10 +824,10 @@ double timeline_mtime(snac *snac)
|
|||
}
|
||||
|
||||
|
||||
int timeline_get(snac *snac, const char *id, xs_dict **msg)
|
||||
int timeline_get_by_md5(snac *snac, const char *md5, xs_dict **msg)
|
||||
/* gets a message from the timeline */
|
||||
{
|
||||
return object_get_by_md5(id, msg, NULL);
|
||||
return object_get_by_md5(md5, msg, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
|
6
html.c
6
html.c
|
@ -830,7 +830,7 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, int local, int level, cons
|
|||
p = children;
|
||||
while (xs_list_iter(&p, &cmd5)) {
|
||||
xs *chd = NULL;
|
||||
object_get_by_md5(cmd5, &chd, NULL);
|
||||
timeline_get_by_md5(snac, cmd5, &chd);
|
||||
|
||||
if (older_open && left <= 3) {
|
||||
ss = xs_str_cat(ss, "</details>\n");
|
||||
|
@ -895,7 +895,7 @@ d_char *html_timeline(snac *snac, char *list, int local, int skip, int show, int
|
|||
while (xs_list_iter(&list, &v)) {
|
||||
xs *msg = NULL;
|
||||
|
||||
if (!valid_status(object_get_by_md5(v, &msg, NULL)))
|
||||
if (!valid_status(timeline_get_by_md5(snac, v, &msg)))
|
||||
continue;
|
||||
|
||||
s = html_entry(snac, s, msg, local, 0, v);
|
||||
|
@ -1256,7 +1256,7 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
|
|||
while (xs_list_iter(&p, &v)) {
|
||||
xs *msg = NULL;
|
||||
|
||||
if (!valid_status(timeline_get(&snac, v, &msg)))
|
||||
if (!valid_status(timeline_get_by_md5(&snac, v, &msg)))
|
||||
continue;
|
||||
|
||||
char *id = xs_dict_get(msg, "id");
|
||||
|
|
2
snac.h
2
snac.h
|
@ -88,7 +88,7 @@ int follower_check(snac *snac, const char *actor);
|
|||
d_char *follower_list(snac *snac);
|
||||
|
||||
double timeline_mtime(snac *snac);
|
||||
int timeline_get(snac *snac, const char *id, xs_dict **msg);
|
||||
int timeline_get_by_md5(snac *snac, const char *md5, xs_dict **msg);
|
||||
int timeline_del(snac *snac, char *id);
|
||||
d_char *timeline_simple_list(snac *snac, const char *idx_name, int skip, int show);
|
||||
d_char *timeline_list(snac *snac, const char *idx_name, int skip, int show);
|
||||
|
|
Loading…
Reference in a new issue