2019-05-02 17:17:27 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-01-03 11:03:01 -06:00
|
|
|
class ReviewableQueuedPostSerializer < ReviewableSerializer
|
2019-06-05 11:12:13 -05:00
|
|
|
attributes :reply_to_post_number
|
|
|
|
|
2019-01-03 11:03:01 -06: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 10:56:14 -05:00
|
|
|
:tags,
|
|
|
|
:via_email,
|
2023-01-09 06:20:10 -06:00
|
|
|
:raw_email,
|
2019-01-03 11:03:01 -06:00
|
|
|
)
|
|
|
|
|
2019-06-05 11:12:13 -05:00
|
|
|
def reply_to_post_number
|
2023-01-09 06:20:10 -06:00
|
|
|
object.payload["reply_to_post_number"].to_i
|
2019-06-05 11:12:13 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def include_reply_to_post_number?
|
2023-01-09 06:20:10 -06:00
|
|
|
object.payload.present? && object.payload["reply_to_post_number"].present?
|
2019-06-05 11:12:13 -05:00
|
|
|
end
|
2019-01-03 11:03:01 -06:00
|
|
|
end
|