Progress
This commit is contained in:
@@ -12,6 +12,7 @@ class REST::StatusSerializer < ActiveModel::Serializer
|
||||
attribute :pinned, if: :pinnable?
|
||||
|
||||
attribute :content, unless: :source_requested?
|
||||
attribute :rich_content, unless: :source_requested?
|
||||
attribute :text, if: :source_requested?
|
||||
|
||||
belongs_to :reblog, serializer: REST::StatusSerializer
|
||||
@@ -71,6 +72,10 @@ class REST::StatusSerializer < ActiveModel::Serializer
|
||||
Formatter.instance.format(object).strip
|
||||
end
|
||||
|
||||
def rich_content
|
||||
Formatter.instance.format(object, use_markdown: true).strip
|
||||
end
|
||||
|
||||
def url
|
||||
TagManager.instance.url_for(object)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user