Fix error in CLI EmailDomainBlocks when supplying --with-dns-records (#32863)

This commit is contained in:
Matt Jankowski 2024-11-13 03:39:58 -05:00 committed by Claire
parent f0d734cc6e
commit 90f2c7a1e9
2 changed files with 17 additions and 1 deletions

View file

@ -46,7 +46,7 @@ module Mastodon::CLI
if options[:with_dns_records]
Resolv::DNS.open do |dns|
dns.timeouts = 5
other_domains = dns.getresources(@email_domain_block.domain, Resolv::DNS::Resource::IN::MX).to_a
other_domains = dns.getresources(domain, Resolv::DNS::Resource::IN::MX).to_a.map { |e| e.exchange.to_s }.compact_blank
end
end