diff options
| -rw-r--r-- | data.c | 7 | ||||
| -rw-r--r-- | html.c | 2 | ||||
| -rw-r--r-- | snac.h | 1 |
3 files changed, 9 insertions, 1 deletions
| @@ -824,6 +824,13 @@ double timeline_mtime(snac *snac) | |||
| 824 | } | 824 | } |
| 825 | 825 | ||
| 826 | 826 | ||
| 827 | int timeline_get(snac *snac, const char *id, xs_dict **msg) | ||
| 828 | /* gets a message from the timeline */ | ||
| 829 | { | ||
| 830 | return object_get_by_md5(id, msg, NULL); | ||
| 831 | } | ||
| 832 | |||
| 833 | |||
| 827 | int timeline_del(snac *snac, char *id) | 834 | int timeline_del(snac *snac, char *id) |
| 828 | /* deletes a message from the timeline */ | 835 | /* deletes a message from the timeline */ |
| 829 | { | 836 | { |
| @@ -1256,7 +1256,7 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char * | |||
| 1256 | while (xs_list_iter(&p, &v)) { | 1256 | while (xs_list_iter(&p, &v)) { |
| 1257 | xs *msg = NULL; | 1257 | xs *msg = NULL; |
| 1258 | 1258 | ||
| 1259 | if (!valid_status(object_get_by_md5(v, &msg, NULL))) | 1259 | if (!valid_status(timeline_get(&snac, v, &msg))) |
| 1260 | continue; | 1260 | continue; |
| 1261 | 1261 | ||
| 1262 | char *id = xs_dict_get(msg, "id"); | 1262 | char *id = xs_dict_get(msg, "id"); |
| @@ -88,6 +88,7 @@ int follower_check(snac *snac, const char *actor); | |||
| 88 | d_char *follower_list(snac *snac); | 88 | d_char *follower_list(snac *snac); |
| 89 | 89 | ||
| 90 | double timeline_mtime(snac *snac); | 90 | double timeline_mtime(snac *snac); |
| 91 | int timeline_get(snac *snac, const char *id, xs_dict **msg); | ||
| 91 | int timeline_del(snac *snac, char *id); | 92 | int timeline_del(snac *snac, char *id); |
| 92 | d_char *timeline_simple_list(snac *snac, const char *idx_name, int skip, int show); | 93 | d_char *timeline_simple_list(snac *snac, const char *idx_name, int skip, int show); |
| 93 | d_char *timeline_list(snac *snac, const char *idx_name, int skip, int show); | 94 | d_char *timeline_list(snac *snac, const char *idx_name, int skip, int show); |