Apply mute filters to questions asked directly

This commit is contained in:
Karina Kwiatek 2021-12-22 19:45:08 +01:00
parent 249438e5a8
commit c31ab3578d
1 changed files with 3 additions and 1 deletions

View File

@ -66,8 +66,10 @@ class Ajax::QuestionController < AjaxController
return
end
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
@response[:message] = I18n.t('messages.question.create.okay')