commit 4bbebe8
default
·
2022-11-25 11:42:42 +0000 UTC
parent 9df1cb1
Started maintaining timeline.idx and local.idx.
1 files changed,
+9,
-0
M
data.c
M
data.c
+9,
-0
1@@ -924,7 +924,16 @@ int timeline_add(snac *snac, char *id, char *o_msg, char *parent, char *referrer
2
3 if ((ret = _timeline_write(snac, id, msg, parent, referrer))) {
4 snac_debug(snac, 1, xs_fmt("timeline_add %s", id));
5+
6 object_add(id, o_msg);
7+
8+ xs *idx = xs_fmt("%s/timeline.idx", snac->basedir);
9+ index_add(idx, id);
10+
11+ if (xs_startswith(id, snac->actor)) {
12+ idx = xs_replace_i(idx, "timeline.", "local.");
13+ index_add(idx, id);
14+ }
15 }
16
17 return ret;