mirror of
https://github.com/discourse/discourse.git
synced 2024-12-05 08:40:29 +08:00
6b613e3076
* FEATURE: Review every post using the review queue. If the `review_every_post` setting is enabled, posts created and edited by regular uses are sent to the review queue so staff can review them. We'll skip PMs and posts created or edited by TL4 or staff users. Staff can choose to: - Approve the post (nothing happens) - Approve and restore the post (if deleted) - Approve and unhide the post (if hidden) - Reject and delete it - Reject and keep deleted (if deleted) - Reject and suspend the user - Reject and silence the user * Update config/locales/server.en.yml Co-authored-by: Robin Ward <robin.ward@gmail.com> Co-authored-by: Robin Ward <robin.ward@gmail.com>
23 lines
421 B
Ruby
23 lines
421 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ReviewablePostSerializer < ReviewableSerializer
|
|
target_attributes :cooked, :raw, :reply_count, :reply_to_post_number
|
|
attributes :blank_post, :post_updated_at, :post_version
|
|
|
|
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
|