mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-21 22:51:28 +00:00
NSFW only show statuses filter added
This commit is contained in:
parent
902b5a40b2
commit
0c9593e961
|
@ -7,6 +7,7 @@
|
|||
"max_statuses": 40,
|
||||
"per_status_mode": false,
|
||||
"enabled_nsfw": true,
|
||||
"nsfw_only": false,
|
||||
"hide_reblogs": false,
|
||||
"default_content_type": "text/plain",
|
||||
"default_visibility": "unlisted",
|
||||
|
|
|
@ -28,6 +28,7 @@ instance_point="$default_connect_protocol://$instance/api/v1"
|
|||
instance_point_pleroma="$default_connect_protocol://$instance/api/pleroma"
|
||||
instance_hist='instance.hist'
|
||||
enabled_nsfw=$(jj -i config.json enabled_nsfw)
|
||||
nsfw_only=$(jj -i config.json nsfw_only)
|
||||
hide_reblogs=$(jj -i config.json hide_reblogs)
|
||||
max_statuses=$(jj -i config.json max_statuses)
|
||||
default_visibility=$(jj -i config.json default_visibility)
|
||||
|
@ -405,10 +406,15 @@ 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
|
||||
if [ "$nsfw_only" = 'true' ] && [ "$sensitive" = 'false' ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
whoacct=$(echo "$status" | jj account.acct)
|
||||
reblogacct=$(echo "$status" | jj reblog.account.acct)
|
||||
uri=$(echo "$status" | jj uri)
|
||||
|
|
Loading…
Reference in a new issue