diff options
| -rw-r--r-- | data.c | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -913,11 +913,9 @@ int _timeline_write(snac *snac, char *id, char *msg, char *parent, char *referre | |||
| 913 | } | 913 | } |
| 914 | 914 | ||
| 915 | 915 | ||
| 916 | void timeline_object_add(snac *snac, const char *id, char *msg) | 916 | void timeline_update_indexes(snac *snac, const char *id) |
| 917 | /* adds an object and update the user indexes */ | 917 | /* updates the indexes */ |
| 918 | { | 918 | { |
| 919 | object_add(id, msg); | ||
| 920 | |||
| 921 | /* add to the private index */ | 919 | /* add to the private index */ |
| 922 | xs *idx = xs_fmt("%s/private.idx", snac->basedir); | 920 | xs *idx = xs_fmt("%s/private.idx", snac->basedir); |
| 923 | index_add(idx, id); | 921 | index_add(idx, id); |
| @@ -969,7 +967,8 @@ int timeline_add(snac *snac, char *id, char *o_msg, char *parent, char *referrer | |||
| 969 | if ((ret = _timeline_write(snac, id, msg, parent, referrer))) { | 967 | if ((ret = _timeline_write(snac, id, msg, parent, referrer))) { |
| 970 | snac_debug(snac, 1, xs_fmt("timeline_add %s", id)); | 968 | snac_debug(snac, 1, xs_fmt("timeline_add %s", id)); |
| 971 | 969 | ||
| 972 | timeline_object_add(snac, id, o_msg); | 970 | object_add(id, o_msg); |
| 971 | timeline_update_indexes(snac, id); | ||
| 973 | } | 972 | } |
| 974 | 973 | ||
| 975 | return ret; | 974 | return ret; |
| @@ -1024,6 +1023,7 @@ void timeline_admire(snac *snac, char *id, char *admirer, int like) | |||
| 1024 | else | 1023 | else |
| 1025 | snac_log(snac, xs_fmt("timeline_admire ignored for unknown object %s", id)); | 1024 | snac_log(snac, xs_fmt("timeline_admire ignored for unknown object %s", id)); |
| 1026 | 1025 | ||
| 1026 | timeline_update_indexes(snac, id); | ||
| 1027 | object_admire(id, admirer, like); | 1027 | object_admire(id, admirer, like); |
| 1028 | } | 1028 | } |
| 1029 | 1029 | ||