summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-05-08 16:43:02 +0200
committerdefault <nobody@localhost>2024-05-08 16:43:02 +0200
commit979f2ad1400111bcd36da980ba8f78f25bb5390e (patch)
tree1a2e4d76bf54633fad3beb307bf2612991eac8e3 /main.c
parent34c8968cfb0aaa14ed901115c1addd1886916b79 (diff)
Rewritten content_search() to read from both timelines.
Diffstat (limited to 'main.c')
-rw-r--r--main.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/main.c b/main.c
index 240e02e..bd52b19 100644
--- a/main.c
+++ b/main.c
@@ -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;