Include to field in pleroma blocking

This commit is contained in:
Bob Mottram 2018-01-22 09:43:17 +00:00
parent 999b506fe2
commit 8afe110663
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ function create_pleroma_blocklist {
echo 'while read blocked; do' >> $blocking_script_file echo 'while read blocked; do' >> $blocking_script_file
echo ' if [[ "$blocked" == *"."* || "$blocked" == *"@"* ]]; then' >> $blocking_script_file echo ' if [[ "$blocked" == *"."* || "$blocked" == *"@"* ]]; then' >> $blocking_script_file
echo ' if [ ${#blocked} -gt 4 ]; then' >> $blocking_script_file echo ' if [ ${#blocked} -gt 4 ]; then' >> $blocking_script_file
echo " sudo -u postgres psql -d pleroma -c \"DELETE FROM objects WHERE data->>'content' ilike '%\${blocked}%' or data->>'actor' ilike '%\${blocked}%'\"" >> $blocking_script_file echo " sudo -u postgres psql -d pleroma -c \"DELETE FROM objects WHERE data->>'content' ilike '%\${blocked}%' or data->>'actor' ilike '%\${blocked}%' or data->>'to' ilike '%\${blocked}%'\"" >> $blocking_script_file
echo ' fi' >> $blocking_script_file echo ' fi' >> $blocking_script_file
echo ' fi' >> $blocking_script_file echo ' fi' >> $blocking_script_file
echo "done </root/${PROJECT_NAME}-firewall-domains.cfg" >> $blocking_script_file echo "done </root/${PROJECT_NAME}-firewall-domains.cfg" >> $blocking_script_file