Started maintaining timeline.idx and local.idx.

This commit is contained in:
default 2022-11-25 12:42:42 +01:00
parent 9df1cb129e
commit 4bbebe8e4e

9
data.c
View file

@ -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))) { if ((ret = _timeline_write(snac, id, msg, parent, referrer))) {
snac_debug(snac, 1, xs_fmt("timeline_add %s", id)); snac_debug(snac, 1, xs_fmt("timeline_add %s", id));
object_add(id, o_msg); 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; return ret;