Mark posts as solved in an importer

:wave:

Thanks for sharing your solutions @pfaffman and @vinothkannans

I just re-used your code:

post.custom_fields["is_accepted_answer"] = "true"
topic.custom_fields["accepted_answer_post_id"] = post.id
topic.save!
post.save!

This worked to an extent, I can see the solved status when I scroll to the accepted post, but the import fell-short in two ways:

  1. Solved post is not quoted into 1st post of topic
  2. Title of solved post on index page is not prepended with a :check_box_with_check:

I am parsing through the code in plugin.rb but it’s a little beyond me… any ideas?