Add Camo for comments

This commit is contained in:
Dennis Schubert 2014-11-08 21:20:44 +01:00
parent cca0c9eec4
commit 613f2d1142

View file

@ -83,6 +83,14 @@ class Comment < ActiveRecord::Base
@message ||= Diaspora::MessageRenderer.new text
end
def text
if AppConfig.privacy.camo.proxy_markdown_images?
Diaspora::Camo::from_markdown(self[:text])
else
self[:text]
end
end
def text= text
self[:text] = text.to_s.strip #to_s if for nil, for whatever reason
end