mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-22 04:45:46 -04:00
FIX: Don't log empty bodies from moderation actions
This commit is contained in:
parent
9d1e37fb46
commit
00ecec1ee4
1 changed files with 6 additions and 4 deletions
|
@ -179,10 +179,12 @@ class Post < ActiveRecord::Base
|
|||
|
||||
new_cooked = Plugin::Filter.apply(:after_post_cook, self, cooked)
|
||||
|
||||
if new_cooked != cooked && new_cooked.blank?
|
||||
Rails.logger.warn("Plugin is blanking out post: #{self.url}\nraw: #{self.raw}")
|
||||
elsif new_cooked.blank?
|
||||
Rails.logger.warn("Blank post detected post: #{self.url}\nraw: #{self.raw}")
|
||||
if post_type == Post.types[:regular]
|
||||
if new_cooked != cooked && new_cooked.blank?
|
||||
Rails.logger.warn("Plugin is blanking out post: #{self.url}\nraw: #{self.raw}")
|
||||
elsif new_cooked.blank?
|
||||
Rails.logger.warn("Blank post detected post: #{self.url}\nraw: #{self.raw}")
|
||||
end
|
||||
end
|
||||
|
||||
new_cooked
|
||||
|
|
Loading…
Reference in a new issue