from fba import database
from fba import utils
+from fba.helpers import blacklist
from fba.helpers import config
from fba.helpers import domain as domain_helper
from fba.helpers import tidyup
logger.debug("domain='%s' - CALLED!", domain)
domain_helper.raise_on(domain)
- if not instances.is_registered(domain):
+ if blacklist.is_blacklisted(domain):
+ raise Exception(f"domain='{domain}' is blacklisted but function is invoked.")
+ elif not instances.is_registered(domain):
raise Exception(f"domain='{domain}' is not registered but function is invoked.")
blockdict = list()
logger.debug("domain='%s' - CALLED!", domain)
domain_helper.raise_on(domain)
- if not instances.is_registered(domain):
+ if blacklist.is_blacklisted(domain):
+ raise Exception(f"domain='{domain}' is blacklisted but function is invoked.")
+ elif not instances.is_registered(domain):
raise Exception(f"domain='{domain}' is not registered but function is invoked.")
logger.debug("Fetching mastodon blocks from domain='%s'", domain)