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
|
@message ||= Diaspora::MessageRenderer.new text
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def text
|
||||||
|
if AppConfig.privacy.camo.proxy_markdown_images?
|
||||||
|
Diaspora::Camo::from_markdown(self[:text])
|
||||||
|
else
|
||||||
|
self[:text]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def text= text
|
def text= text
|
||||||
self[:text] = text.to_s.strip #to_s if for nil, for whatever reason
|
self[:text] = text.to_s.strip #to_s if for nil, for whatever reason
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue