logo

mastofe

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

mute_service.rb (386B)


  1. # frozen_string_literal: true
  2. class MuteService < BaseService
  3. def call(account, target_account, notifications: nil)
  4. return if account.id == target_account.id
  5. FeedManager.instance.clear_from_timeline(account, target_account)
  6. mute = account.mute!(target_account, notifications: notifications)
  7. BlockWorker.perform_async(account.id, target_account.id)
  8. mute
  9. end
  10. end