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

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