-
-
Save nightpool/7626202da05ec2f301850d0f5b343cce to your computer and use it in GitHub Desktop.
get rid of the spammers (once you've added a patch to prevent them from coming back, i hope!)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# find recent statuses linking to womenarestupid.site | |
spam_statuses = Status.where("id > 102230000000000000").where("text ilike '%https://womenarestupid.site%'").includes(:account) | |
# filter out accounts that have any local followers (almost certainly false positives) | |
spam_accounts = spam_statuses.map(&:account).uniq.select { |i| i.followers.local.count == 0 } | |
# double check their usernames to make sure | |
# (you can replace :acct with :uri if you want to look at their profiles) | |
puts spam_accounts.map(&:acct) | |
# when you're ready, run the next line below (commented so people don't run it on accident) | |
# spam_accounts.each { |i| Admin::SuspensionWorker.perform_async(i.id) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment