2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-01-03 12:03:01 -05:00
|
|
|
class ReviewableQueuedPostSerializer < ReviewableSerializer
|
|
|
|
|
2019-06-05 12:12:13 -04:00
|
|
|
attributes :reply_to_post_number
|
|
|
|
|
2019-01-03 12:03:01 -05:00
|
|
|
payload_attributes(
|
|
|
|
:raw,
|
|
|
|
:title,
|
|
|
|
:archetype,
|
|
|
|
:category,
|
|
|
|
:visible,
|
|
|
|
:is_warning,
|
|
|
|
:first_post_checks,
|
|
|
|
:featured_link,
|
|
|
|
:is_poll,
|
|
|
|
:typing_duration_msecs,
|
|
|
|
:composer_open_duration_msecs,
|
|
|
|
:tags
|
|
|
|
)
|
|
|
|
|
2019-06-05 12:12:13 -04:00
|
|
|
def reply_to_post_number
|
|
|
|
object.payload['reply_to_post_number'].to_i
|
|
|
|
end
|
|
|
|
|
|
|
|
def include_reply_to_post_number?
|
|
|
|
object.payload['reply_to_post_number'].present?
|
|
|
|
end
|
|
|
|
|
2019-01-03 12:03:01 -05:00
|
|
|
end
|