diff options
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/notify_service.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb index 9c7eb26ef..7b377f6a8 100644 --- a/app/services/notify_service.rb +++ b/app/services/notify_service.rb @@ -43,10 +43,19 @@ class NotifyService < BaseService blocked ||= (@notification.from_account.silenced? && !@recipient.following?(@notification.from_account)) # Hellban blocked ||= (@recipient.user.settings.interactions['must_be_follower'] && !@notification.from_account.following?(@recipient)) # Options blocked ||= (@recipient.user.settings.interactions['must_be_following'] && !@recipient.following?(@notification.from_account)) # Options + blocked ||= conversation_muted? blocked ||= send("blocked_#{@notification.type}?") # Type-dependent filters blocked end + def conversation_muted? + if @notification.target_status + @recipient.muting_conversation?(@notification.target_status.conversation) + else + false + end + end + def create_notification @notification.save! return unless @notification.browserable? |