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,
|
2019-07-19 11:56:14 -04:00
|
|
|
:tags,
|
|
|
|
:via_email,
|
|
|
|
:raw_email,
|
2019-01-03 12:03:01 -05:00
|
|
|
)
|
|
|
|
|
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?
|
2019-06-05 12:44:56 -04:00
|
|
|
object.payload.present? && object.payload["reply_to_post_number"].present?
|
2019-06-05 12:12:13 -04:00
|
|
|
end
|
2019-01-03 12:03:01 -05:00
|
|
|
end
|