Keep notification when muting_notifications is true (#7311)
* Keep notification when muting_notifications is true * Retrun mute object * Fix test
This commit is contained in:
parent
d0cdd5cf94
commit
71a7cea73f
4 changed files with 34 additions and 39 deletions
|
@ -3,9 +3,13 @@
|
|||
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)
|
||||
|
||||
mute = account.mute!(target_account, notifications: notifications)
|
||||
BlockWorker.perform_async(account.id, target_account.id)
|
||||
if mute.hide_notifications?
|
||||
BlockWorker.perform_async(account.id, target_account.id)
|
||||
else
|
||||
FeedManager.instance.clear_from_timeline(account, target_account)
|
||||
end
|
||||
mute
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue