snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 4bbebe8e4e4f2a43c4c7d0d193f6bc4a228a461d
parent 9df1cb129e1702f1a271a948033447167c5c06d7
Author: default <nobody@localhost>
Date:   Fri, 25 Nov 2022 12:42:42 +0100

Started maintaining timeline.idx and local.idx.

Diffstat:
Mdata.c | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/data.c b/data.c @@ -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;