Delete other posts in a topic shouldn't unanswer the answer post

There exists a potential bug in discourse-solved plugin, when any of the post in the answered topic is removed(trigger post-destroyed), whether the removed post is marked as the answer or not, the marked answer will be unanswered.

It seems weird because once someone removes an unrelated post in a topic, the topic owner will have to reselect an answer, or they will be notified by the discobot.

Maybe changing that logic to: only removing the post marked as answer will the post be unanswered is a more reasonable approach?

A PR for fix is raised here:

1 Like

Great catch, such a weird bug. Do you mind adding a small test?

1 Like

I have added an RSpec, it seems that the test has passed now.