diff --git a/src/query.c b/src/query.c index 921df49..74b37c7 100644 --- a/src/query.c +++ b/src/query.c @@ -119,6 +119,7 @@ char* read_post_data(struct query_values* post) { "min_id", &(post->min_id), key_string }, { "max_id", &(post->max_id), key_string }, { "start_id", &(post->start_id), key_string }, + { "visibility", &(post->visibility), key_string }, { "file", &(post->files), key_files } }; // END Query references diff --git a/src/query.h b/src/query.h index 06d7173..6d9244c 100644 --- a/src/query.h +++ b/src/query.h @@ -60,6 +60,7 @@ struct query_values char* min_id; char* max_id; char* start_id; + char* visibility; struct file_array files; }; diff --git a/src/status.c b/src/status.c index b247aef..f72e801 100644 --- a/src/status.c +++ b/src/status.c @@ -75,7 +75,7 @@ int try_post_status(struct session* ssn, mastodont_t* api) .sensitive = 0, .spoiler_text = NULL, .status = ssn->post.content, - .visibility = "public", + .visibility = ssn->post.visibility, }; mastodont_create_status(api, &args, &storage); @@ -235,7 +235,7 @@ char* construct_status(mastodont_t* api, config_url_prefix, status->account.acct, status->account.acct, /* Account */ - "Public", /* visibility */ + status->visibility, /* visibility */ config_url_prefix, status->id, status->muted ? "un" : "", diff --git a/static/post.html b/static/post.html index e21b649..933ff72 100644 --- a/static/post.html +++ b/static/post.html @@ -4,8 +4,15 @@