Add Camo for comments
This commit is contained in:
parent
cca0c9eec4
commit
613f2d1142
1 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue