|
|
|
@ -39,7 +39,7 @@ module Mastodon::CLI |
|
|
|
processed = 0 |
|
|
|
processed = 0 |
|
|
|
|
|
|
|
|
|
|
|
domains.each do |domain| |
|
|
|
domains.each do |domain| |
|
|
|
if EmailDomainBlock.where(domain: domain).exists? |
|
|
|
if EmailDomainBlock.exists?(domain: domain) |
|
|
|
say("#{domain} is already blocked.", :yellow) |
|
|
|
say("#{domain} is already blocked.", :yellow) |
|
|
|
skipped += 1 |
|
|
|
skipped += 1 |
|
|
|
next |
|
|
|
next |
|
|
|
@ -60,7 +60,7 @@ module Mastodon::CLI |
|
|
|
(email_domain_block.other_domains || []).uniq.each do |hostname| |
|
|
|
(email_domain_block.other_domains || []).uniq.each do |hostname| |
|
|
|
another_email_domain_block = EmailDomainBlock.new(domain: hostname, parent: email_domain_block) |
|
|
|
another_email_domain_block = EmailDomainBlock.new(domain: hostname, parent: email_domain_block) |
|
|
|
|
|
|
|
|
|
|
|
if EmailDomainBlock.where(domain: hostname).exists? |
|
|
|
if EmailDomainBlock.exists?(domain: hostname) |
|
|
|
say("#{hostname} is already blocked.", :yellow) |
|
|
|
say("#{hostname} is already blocked.", :yellow) |
|
|
|
skipped += 1 |
|
|
|
skipped += 1 |
|
|
|
next |
|
|
|
next |
|
|
|
|