about summary refs log tree commit diff
path: root/app/services/mute_service.rb
blob: fc63f83e92614e79c4a015b2ee9b960e6e0560e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
# frozen_string_literal: true

class MuteService < BaseService
  def call(account, target_account, **opts)
    return if account.id == target_account.id
    FeedManager.instance.clear_from_timeline(account, target_account)
    account.mute!(target_account, **opts.slice(:notifications))
  end
end