diff options
author | default <nobody@localhost> | 2024-05-08 16:43:02 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2024-05-08 16:43:02 +0200 |
commit | 979f2ad1400111bcd36da980ba8f78f25bb5390e (patch) | |
tree | 1a2e4d76bf54633fad3beb307bf2612991eac8e3 /main.c | |
parent | 34c8968cfb0aaa14ed901115c1addd1886916b79 (diff) |
Rewritten content_search() to read from both timelines.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 22 |
1 files changed, 1 insertions, 21 deletions
@@ -376,30 +376,10 @@ int main(int argc, char *argv[]) } if (strcmp(cmd, "search") == 0) { /** **/ - xs *tl = timeline_simple_list(&snac, "private", 0, XS_ALL); int to; /* 'url' contains the regex */ - xs *r = content_search(&snac, tl, url, 10, &to); - - int c = 0; - char *v; - - /* print results as standalone links */ - while (xs_list_next(r, &v, &c)) { - printf("%s/admin/p/%s\n", snac.actor, v); - } - - return 0; - } - - if (strcmp(cmd, "search2") == 0) { /** **/ - /* undocumented (for testing only) */ - xs *tl = timeline_simple_list(&snac, "public", 0, XS_ALL); - int to; - - /* 'url' contains the regex */ - xs *r = content_search(&snac, tl, url, 10, &to); + xs *r = content_search(&snac, url, 1, 10, &to); int c = 0; char *v; |