Skip to content
This repository has been archived by the owner on Jan 27, 2020. It is now read-only.

Commit

Permalink
Merge pull request mastodon#789 from pixiv/fix/status_plaintext
Browse files Browse the repository at this point in the history
Fix status plaintext
  • Loading branch information
abcang committed Jan 12, 2018
2 parents 2e1a5d6 + df6c0d9 commit 6e6ce29
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/serializers/rest/status_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class REST::StatusSerializer < ActiveModel::Serializer
attributes :id, :created_at, :in_reply_to_id, :in_reply_to_account_id,
:sensitive, :spoiler_text, :visibility, :language,
:uri, :content, :url, :reblogs_count, :favourites_count, :pixiv_cards, :pinned,
:booth_item_url, :booth_item_id
:booth_item_url, :booth_item_id, :text

attribute :favourited, if: :current_user?
attribute :reblogged, if: :current_user?
Expand Down Expand Up @@ -32,6 +32,10 @@ def content
Formatter.instance.format(object)
end

def text
Formatter.instance.plaintext(object)
end

def url
TagManager.instance.url_for(object)
end
Expand Down

0 comments on commit 6e6ce29

Please sign in to comment.