diff --git a/app/models/comment.rb b/app/models/comment.rb index d0ddb8478..ef4df8494 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -47,7 +47,7 @@ def notify(action:, actor:, recipients:) # to be an ActiveRecord::Relation. subscribers = User.includes(:subscriptions).where( subscriptions: { subscribable_id: commentable.id, subscribable_type: commentable.class.to_s } - ).where.not(id: [user.id] + mentions.pluck(:id)) + ).where.not(id: [user.id] + mentions.pluck(:id)).enabled subscribers = subscribers.select { |user| Ability.new(user).can?(:read, self) } create_notifications(action: :create, actor: actor, recipients: subscribers) end