Commit e51e6a04 authored by azul's avatar azul

log: spam candidates

This way we can see how many false positives we get.
parent 983c723e
......@@ -229,6 +229,8 @@ class Post < ActiveRecord::Base
page = discussion.try.page
return unless page.try.public? && with_link?
return if user.may?(:view, page)
Rails.logger.info 'Detected possible SPAM:'
Rails.logger.info body
errors.add :body, I18n.t(:spam_comment_detected)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment