From 102c8a0e4f0e45a62508930e81daac5035eb0206 Mon Sep 17 00:00:00 2001 From: "me@ow.nekobit.net" Date: Tue, 19 Apr 2022 14:33:01 +0000 Subject: [PATCH] Visibility FossilOrigin-Name: 1cc26251fdd068a12e41853933d03da8bd1861cbf94e548a1c24557c245ec198 --- src/query.c | 1 + src/query.h | 1 + src/status.c | 4 ++-- static/post.html | 9 ++++++++- 4 files changed, 12 insertions(+), 3 deletions(-) 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 @@
+ -