diff --git a/src/cookie.c b/src/cookie.c index 7ba6dce..c1e02c6 100644 --- a/src/cookie.c +++ b/src/cookie.c @@ -52,7 +52,8 @@ char* read_cookies_env(struct cookie_values* cookies) struct key_value_refs refs[] = { { "access_token", &(cookies->access_token) }, { "logged_in", &(cookies->logged_in) }, - { "theme", &(cookies->theme) } + { "theme", &(cookies->theme) }, + { "instance_url", &(cookies->instance_url) } }; do diff --git a/src/cookie.h b/src/cookie.h index 5fb39f3..cb24184 100644 --- a/src/cookie.h +++ b/src/cookie.h @@ -25,6 +25,7 @@ struct cookie_values char* access_token; char* logged_in; char* theme; + char* instance_url; }; struct http_cookie_info diff --git a/src/main.c b/src/main.c index 74f2fff..f2ec039 100644 --- a/src/main.c +++ b/src/main.c @@ -66,8 +66,8 @@ int main(void) char* get_str = read_query_data(&(ssn.query)); mastodont_t api; - if (ssn.post.instance_url) - api.url = ssn.post.instance_url; + if (ssn.cookies.instance_url) + api.url = ssn.cookies.instance_url; else api.url = config_instance_url; mastodont_init(&api, MSTDNT_FLAG_NO_URI_SANITIZE | config_library_flags); diff --git a/src/query.c b/src/query.c index c2899d9..ccb0af3 100644 --- a/src/query.c +++ b/src/query.c @@ -86,8 +86,7 @@ char* read_post_data(struct query_values* post) { "replyid", &(post->replyid) }, { "min_id", &(post->min_id) }, { "max_id", &(post->max_id) }, - { "start_id", &(post->start_id) }, - { "instance_url", &(post->instance_url) }, + { "start_id", &(post->start_id) } }; // END Query references diff --git a/src/query.h b/src/query.h index 9be60c9..39f8b87 100644 --- a/src/query.h +++ b/src/query.h @@ -45,8 +45,6 @@ struct query_values char* min_id; char* max_id; char* start_id; - - char* instance_url; }; struct get_values