Visibility

FossilOrigin-Name: 1cc26251fdd068a12e41853933d03da8bd1861cbf94e548a1c24557c245ec198
This commit is contained in:
me@ow.nekobit.net 2022-04-19 14:33:01 +00:00
parent e412d705d4
commit 102c8a0e4f
4 changed files with 12 additions and 3 deletions

View file

@ -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

View file

@ -60,6 +60,7 @@ struct query_values
char* min_id;
char* max_id;
char* start_id;
char* visibility;
struct file_array files;
};

View file

@ -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" : "",

View file

@ -4,8 +4,15 @@
<textarea name="content" placeholder="Just landed in N.Y." rows="5" tabindex="1">%s</textarea>
<div class="statusfooter">
<div class="statusfooter-left">
<select name="visibility" id="visibility">
<option value="public">Public</option>
<option value="unlisted">Unlisted</option>
<option value="private">Followers</option>
<option value="direct">Direct</option>
<option value="local">Local</option>
<!-- TODO generate lists -->
</select>
<input type="file" name="file" tabindex="3" multiple>
<!-- Put text here -->
</div>
<div class="statusfooter-right">
<input type="submit" value="Post" tabindex="2" class="btn">