diff options
| author | 2022-11-25 12:42:42 +0100 | |
|---|---|---|
| committer | 2022-11-25 12:42:42 +0100 | |
| commit | 4bbebe8e4e4f2a43c4c7d0d193f6bc4a228a461d (patch) | |
| tree | dca95d1c8a2cc4fd51116308f3a8c4bb24f7cd60 /data.c | |
| parent | Use macro XS_ALL were possible. (diff) | |
| download | snac2-4bbebe8e4e4f2a43c4c7d0d193f6bc4a228a461d.tar.gz snac2-4bbebe8e4e4f2a43c4c7d0d193f6bc4a228a461d.tar.xz snac2-4bbebe8e4e4f2a43c4c7d0d193f6bc4a228a461d.zip | |
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 | |||
| 924 | 924 | ||
| 925 | if ((ret = _timeline_write(snac, id, msg, parent, referrer))) { | 925 | if ((ret = _timeline_write(snac, id, msg, parent, referrer))) { |
| 926 | snac_debug(snac, 1, xs_fmt("timeline_add %s", id)); | 926 | snac_debug(snac, 1, xs_fmt("timeline_add %s", id)); |
| 927 | |||
| 927 | object_add(id, o_msg); | 928 | object_add(id, o_msg); |
| 929 | |||
| 930 | xs *idx = xs_fmt("%s/timeline.idx", snac->basedir); | ||
| 931 | index_add(idx, id); | ||
| 932 | |||
| 933 | if (xs_startswith(id, snac->actor)) { | ||
| 934 | idx = xs_replace_i(idx, "timeline.", "local."); | ||
| 935 | index_add(idx, id); | ||
| 936 | } | ||
| 928 | } | 937 | } |
| 929 | 938 | ||
| 930 | return ret; | 939 | return ret; |