added post visibility indicator

This commit is contained in:
ari melody 2024-06-21 05:43:23 +01:00
parent 46f1f93329
commit 919b1f6ebb
Signed by: ari
GPG key ID: CF99829C92678188
4 changed files with 12 additions and 6 deletions

View file

@ -144,18 +144,18 @@ export async function parsePost(data, num_replies) {
post.id = data.id;
post.created_at = new Date(data.created_at);
post.user = await parseUser(data.account);
if (client.instance.capabilities.includes(capabilities.MARKDOWN_CONTENT))
post.text = data.text;
else
post.text = data.content;
post.warning = data.spoiler_text;
post.boost_count = data.reblogs_count;
post.reply_count = data.replies_count;
post.mentions = data.mentions;
post.files = data.media_attachments;
post.url = data.url;
post.visibility = data.visibility;
if (client.instance.capabilities.includes(capabilities.MARKDOWN_CONTENT))
post.text = data.text;
else
post.text = data.content;
post.reply = null;
if (data.in_reply_to_id && num_replies > 0) {