Add Camo for a profiles bio and location
yes, we do have Markdown there. But please don't tell anyone.
This commit is contained in:
parent
0a619749f2
commit
89ad5b96ad
1 changed files with 16 additions and 0 deletions
|
|
@ -142,6 +142,22 @@ class Profile < ActiveRecord::Base
|
||||||
birthday.to_s(:long).gsub(', 1000', '') if birthday.present?
|
birthday.to_s(:long).gsub(', 1000', '') if birthday.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def bio
|
||||||
|
if AppConfig.privacy.camo.proxy_markdown_images?
|
||||||
|
Diaspora::Camo::from_markdown(self[:bio])
|
||||||
|
else
|
||||||
|
self[:bio]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def location
|
||||||
|
if AppConfig.privacy.camo.proxy_markdown_images?
|
||||||
|
Diaspora::Camo::from_markdown(self[:location])
|
||||||
|
else
|
||||||
|
self[:location]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def bio_message
|
def bio_message
|
||||||
@bio_message ||= Diaspora::MessageRenderer.new(bio)
|
@bio_message ||= Diaspora::MessageRenderer.new(bio)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue