Skip to content
Snippets Groups Projects
Commit b6f010e4 authored by Bob Mottram's avatar Bob Mottram
Browse files

Don't send pleroma posts to blocked instances

parent 164d7ae9
No related branches found
No related tags found
No related merge requests found
......@@ -83,6 +83,9 @@ function create_pleroma_blocklist {
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}%' or data->>'to' ilike '%\${blocked}%' or data->>'id' ilike '%\${blocked}%' or data->>'external_url' ilike '%\${blocked}%'\"" >> $blocking_script_file
echo " sudo -u postgres psql -d pleroma -c \"DELETE FROM users WHERE nickname ilike '%\${blocked}%'\"" >> $blocking_script_file
echo ' if [[ "$blocked" != *"@"* ]]; then' >> $blocking_script_file
echo " sudo -u postgres psql -d pleroma -c \"DELETE FROM websub_server_subscriptions WHERE callback like '%\${blocked}%'\"" >> $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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment