diff options
author | default <nobody@localhost> | 2022-11-25 12:42:42 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2022-11-25 12:42:42 +0100 |
commit | 4bbebe8e4e4f2a43c4c7d0d193f6bc4a228a461d (patch) | |
tree | dca95d1c8a2cc4fd51116308f3a8c4bb24f7cd60 /data.c | |
parent | 9df1cb129e1702f1a271a948033447167c5c06d7 (diff) |
Started maintaining timeline.idx and local.idx.
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -924,7 +924,16 @@ int timeline_add(snac *snac, char *id, char *o_msg, char *parent, char *referrer if ((ret = _timeline_write(snac, id, msg, parent, referrer))) { snac_debug(snac, 1, xs_fmt("timeline_add %s", id)); + object_add(id, o_msg); + + xs *idx = xs_fmt("%s/timeline.idx", snac->basedir); + index_add(idx, id); + + if (xs_startswith(id, snac->actor)) { + idx = xs_replace_i(idx, "timeline.", "local."); + index_add(idx, id); + } } return ret; |