diff --git a/app/controllers/ajax/question_controller.rb b/app/controllers/ajax/question_controller.rb index c3c34737..9a140bef 100644 --- a/app/controllers/ajax/question_controller.rb +++ b/app/controllers/ajax/question_controller.rb @@ -66,7 +66,9 @@ class Ajax::QuestionController < AjaxController return end - Inbox.create!(user_id: u.id, question_id: question.id, new: true) + unless MuteRule.where(user: u).any? { |rule| rule.applies_to? question } + Inbox.create!(user_id: u.id, question_id: question.id, new: true) + end end @response[:status] = :okay