aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorOliver <zen@noreply.codeberg.org>2025-08-23 11:04:11 +0200
committerOliver <zen@noreply.codeberg.org>2025-08-23 11:04:11 +0200
commite50a6ba146def4accc36d9d6cc4be43e4a758711 (patch)
tree7490d0b360b2d85e514ea9816075e661e3f98b7b /main.c
parenteecfeec3745333451de6a2b1754f43f171e23e5d (diff)
parent3611f42fe202c6ec198c34dbc0a5939b8287583e (diff)
Merge pull request 'master' (#11) from grunfink/snac2:master into master
Reviewed-on: https://codeberg.org/zen/snac2/pulls/11
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/main.c b/main.c
index c4c298f..e01b6a2 100644
--- a/main.c
+++ b/main.c
@@ -39,6 +39,7 @@ int usage(const char *cmd)
"unfollow {basedir} {uid} {actor} Unfollows an actor\n"
"request {basedir} {uid} {url} Requests an object\n"
"insert {basedir} {uid} {url} Requests an object and inserts it into the timeline\n"
+ "collect_replies {basedir} {uid} {url} Collects all replies from a post\n"
"actor {basedir} [{uid}] {url} Requests an actor\n"
"note {basedir} {uid} {text} [files...] Sends a note with optional attachments\n"
"note_unlisted {basedir} {uid} {text} [files...] Sends an unlisted note with optional attachments\n"
@@ -61,7 +62,7 @@ int usage(const char *cmd)
"verify_links {basedir} {uid} Verifies a user's links (in the metadata)\n"
"search {basedir} {uid} {regex} Searches posts by content\n"
"export_csv {basedir} {uid} Exports followers, lists, MUTEd and bookmarks to CSV\n"
- "export_posts {basedir} {iod} Exports all posts to outbox.json\n"
+ "export_posts {basedir} {uid} Exports all posts to outbox.json\n"
"alias {basedir} {uid} {account} Sets account (@user@host or actor url) as an alias\n"
"migrate {basedir} {uid} Migrates to the account defined as the alias\n"
"import_csv {basedir} {uid} Imports data from CSV files\n"
@@ -494,6 +495,7 @@ int main(int argc, char *argv[])
if (msg != NULL) {
enqueue_message(&snac, msg);
+ timeline_admire(&snac, xs_dict_get(msg, "object"), snac.actor, 0);
if (dbglevel) {
xs_json_dump(msg, 4, stdout);
@@ -730,6 +732,12 @@ int main(int argc, char *argv[])
return 0;
}
+ if (strcmp(cmd, "collect_replies") == 0) { /** **/
+ enqueue_collect_replies(&snac, url);
+
+ return 0;
+ }
+
if (strcmp(cmd, "insert") == 0) { /** **/
int status;
xs *data = NULL;