mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-22 05:11:26 +00:00
Detect nsfw reblogs
This commit is contained in:
parent
0c9593e961
commit
6609a6d169
|
@ -408,12 +408,23 @@ statuses_render()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sensitive=$(echo "$status" | jj sensitive)
|
sensitive=$(echo "$status" | jj sensitive)
|
||||||
|
sensitive_reblog=$(echo "$status" | jj reblog.sensitive)
|
||||||
|
|
||||||
|
if [ -n "$reblog" ]; then
|
||||||
|
if [ "$enabled_nsfw" = 'false' ] && [ "$sensitive_reblog" = 'true' ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
if [ "$nsfw_only" = 'true' ] && [ "$sensitive_reblog" = 'false' ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
else
|
||||||
if [ "$enabled_nsfw" = 'false' ] && [ "$sensitive" = 'true' ]; then
|
if [ "$enabled_nsfw" = 'false' ] && [ "$sensitive" = 'true' ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [ "$nsfw_only" = 'true' ] && [ "$sensitive" = 'false' ]; then
|
if [ "$nsfw_only" = 'true' ] && [ "$sensitive" = 'false' ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
whoacct=$(echo "$status" | jj account.acct)
|
whoacct=$(echo "$status" | jj account.acct)
|
||||||
reblogacct=$(echo "$status" | jj reblog.account.acct)
|
reblogacct=$(echo "$status" | jj reblog.account.acct)
|
||||||
|
@ -439,7 +450,7 @@ statuses_render()
|
||||||
if [ -n "$spoiler_text" ]; then
|
if [ -n "$spoiler_text" ]; then
|
||||||
echo "#[$spoiler_text]"
|
echo "#[$spoiler_text]"
|
||||||
fi
|
fi
|
||||||
if [ "$sensitive" = 'true' ]; then
|
if [ "$sensitive" = 'true' -o "$sensitive_reblog" = 'true' ]; then
|
||||||
echo '[NSFW]'
|
echo '[NSFW]'
|
||||||
fi
|
fi
|
||||||
echo "$status" | jj -r content | delqse | html_to_txt_render
|
echo "$status" | jj -r content | delqse | html_to_txt_render
|
||||||
|
|
Loading…
Reference in a new issue