discourse/app/serializers/reviewable_flagged_post_serializer.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
482 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class ReviewableFlaggedPostSerializer < ReviewableSerializer
target_attributes :cooked, :raw, :reply_count, :reply_to_post_number, :deleted_at
attributes :blank_post, :post_updated_at, :post_version
def created_from_flag?
true
end
def post_version
object.target&.version
end
def post_updated_at
object.target&.updated_at
end
def blank_post
true
end
def include_blank_post?
object.target.blank?
end
end