logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

block_domain_from_account_service.rb (244B)


  1. # frozen_string_literal: true
  2. class BlockDomainFromAccountService < BaseService
  3. def call(account, domain)
  4. account.block_domain!(domain)
  5. account.passive_relationships.where(account: Account.where(domain: domain)).delete_all
  6. end
  7. end