From c9c59ae4a20676deb848e2eebc5531b72c3504a2 Mon Sep 17 00:00:00 2001 From: "me@ow.nekobit.net" Date: Thu, 3 Mar 2022 15:51:31 +0000 Subject: [PATCH] Timeline args FossilOrigin-Name: 801b2fb5ff2868522ef05e7eb50eb51c6411bb7f441530463abe933fd7a1dbda --- src/timeline.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/src/timeline.c b/src/timeline.c index 17f8446..05b9337 100644 --- a/src/timeline.c +++ b/src/timeline.c @@ -21,7 +21,7 @@ int mastodont_timeline_list(mastodont_t* data, char* list_id, - struct mstdnt_timeline_list_args* args, + struct mstdnt_args* args, struct mstdnt_storage* storage, struct mstdnt_status* statuses[], size_t* size) @@ -32,15 +32,6 @@ int mastodont_timeline_list(mastodont_t* data, snprintf(url, MSTDNT_URLSIZE, "api/v1/timelines/list/%s", list_id); /* Default args */ - struct mstdnt_timeline_list_args _args; - if (args == NULL) - { - _args.max_id = NULL; - _args.since_id = NULL; - _args.min_id = NULL; - _args.limit = 20; - args = &_args; - } storage->needs_cleanup = 0; union param_value u_local, u_remote, u_only_media, @@ -75,7 +66,7 @@ cleanup: } int mastodont_timeline_public(mastodont_t* data, - struct mstdnt_timeline_public_args* args, + struct mstdnt_args* args, struct mstdnt_storage* storage, struct mstdnt_status* statuses[], size_t* size) @@ -84,18 +75,6 @@ int mastodont_timeline_public(mastodont_t* data, struct mstdnt_fetch_results results = { 0 }; /* Default args */ - struct mstdnt_timeline_public_args _args; - if (args == NULL) - { - _args.local = 0; /* Defaults to false */ - _args.remote = 0; - _args.only_media = 0; - _args.max_id = NULL; - _args.since_id = NULL; - _args.min_id = NULL; - _args.limit = 20; - args = &_args; - } storage->needs_cleanup = 0; union param_value u_local, u_remote, u_only_media,