diff options
author | abcang <abcang1015@gmail.com> | 2018-05-02 23:14:51 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-05-02 16:14:51 +0200 |
commit | 71a7cea73fdfb45d06986e108b2ce1dbf7e32579 (patch) | |
tree | 29c2193e8dbb97f6adea550e71a3cb565de76da5 /app/services | |
parent | d0cdd5cf94ff479e4037dc47539f7f9c408831b3 (diff) |
Keep notification when muting_notifications is true (#7311)
* Keep notification when muting_notifications is true * Retrun mute object * Fix test
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/mute_service.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/services/mute_service.rb b/app/services/mute_service.rb index 9b7cbd81f..c6122a152 100644 --- a/app/services/mute_service.rb +++ b/app/services/mute_service.rb @@ -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 |