blob: d8a95f94bdea9697ce59fd61c40a224b84f9a9c6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
# 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)
# This unwieldy approach avoids duplicating the default value here
# and in mute!.
opts = {}
opts[:notifications] = notifications unless notifications.nil?
account.mute!(target_account, **opts)
end
end
|