first steps on importing blocklists

This commit is contained in:
tsmethurst 2021-07-05 17:26:59 +02:00
commit 8285d09da5
14 changed files with 232 additions and 41 deletions

View file

@ -42,8 +42,8 @@ func (ps *postgresService) GetDomainCountForInstance(domain string) (int, error)
if domain == ps.config.Host {
// if the domain is *this* domain, just count other instances it knows about
// TODO: exclude domains that are blocked or silenced
q = q.Where("domain != ?", domain)
// exclude domains that are blocked
q = q.Where("domain != ?", domain).Where("? IS NULL", pg.Ident("suspended_at"))
} else {
// TODO: implement federated domain counting properly for remote domains
return 0, nil