mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-22 02:01:27 +00:00
NSFW filter changed and disabled by default; mark NSFW content
This commit is contained in:
parent
9c2e71a655
commit
135554fe5b
|
@ -2,7 +2,7 @@
|
|||
"instance": "soc.phreedom.club",
|
||||
"max_statuses": 40,
|
||||
"per_status_mode": false,
|
||||
"enabled_nsfw": false,
|
||||
"enabled_nsfw": true,
|
||||
"hide_reblogs": false,
|
||||
"default_content_type": "text/markdown",
|
||||
"default_visibility": "unlisted",
|
||||
|
|
|
@ -317,10 +317,6 @@ status_api_one()
|
|||
|
||||
statuses_render()
|
||||
{
|
||||
if [ "$enabled_nsfw" = 'false' ]; then
|
||||
ids_massive=$(echo "$jsonmassive" | jj -l '#[sensitive=false]#.id' | delq)
|
||||
jsonmassive=$(echo "$jsonmassive" | jj '#[sensitive=false]#')
|
||||
fi
|
||||
if [ "$reversed_statuses" = 'true' ]; then
|
||||
ids_massive=$(echo "$ids_massive" | tr ' ' '\n' | tac | tr '\n' ' ')
|
||||
fi
|
||||
|
@ -330,6 +326,10 @@ statuses_render()
|
|||
if [ "$hide_reblogs" = 'true' ] && [ -n "$reblog" ]; then
|
||||
continue
|
||||
fi
|
||||
sensitive=$(echo "$status" | jj sensitive)
|
||||
if [ "$enabled_nsfw" = 'false' ] && [ "$sensitive" = 'true' ]; then
|
||||
continue
|
||||
fi
|
||||
whoacct=$(echo "$status" | jj account.acct)
|
||||
reblogacct=$(echo "$status" | jj reblog.account.acct)
|
||||
uri=$(echo "$status" | jj uri)
|
||||
|
@ -350,6 +350,9 @@ statuses_render()
|
|||
if [ -n "$spoiler_text" ]; then
|
||||
echo "#[$spoiler_text]"
|
||||
fi
|
||||
if [ "$sensitive" = 'true' ]; then
|
||||
echo '[NSFW]'
|
||||
fi
|
||||
echo "$status" | jj -r content | delqse | html_to_txt_render
|
||||
attachments=$(echo "$status" | jj -l media_attachments.#.remote_url | delq)
|
||||
if [ -n "$attachments" ]; then
|
||||
|
|
Loading…
Reference in a new issue