# 토픽 내 다른 게시물을 삭제해도 답변 상태가 해제되지 않아야 합니다

**URL:** https://meta.discourse.org/t/delete-other-posts-in-a-topic-shouldnt-unanswer-the-answer-post/391717
**Category:** Bug
**Tags:** solved, fixed
**Created:** [12월 19, 2025, 1:46오전 UTC](https://meta.discourse.org/t/delete-other-posts-in-a-topic-shouldnt-unanswer-the-answer-post/391717 "2025-12-19T01:46:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![small-lovely-cat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/small-lovely-cat/32/553546_2.png) [@small-lovely-cat](https://meta.discourse.org/u/small-lovely-cat)
#### Post date: [12월 19, 2025, 1:46오전 UTC](https://meta.discourse.org/t/delete-other-posts-in-a-topic-shouldnt-unanswer-the-answer-post/391717/1 "2025-12-19T01:46:24Z")

</div>

discourse-solved 플러그인에 잠재적 버그가 있습니다. 답변이 달린 토픽의 게시물이 삭제되면(`post-destroyed` 트리거 발생), **삭제된 게시물이 답변으로 지정되었든 아니든** , 지정된 답변이 답변 없음 상태로 변경됩니다.

이는 다소 이상해 보입니다. 토픽 내에서 관련 없는 게시물이 삭제될 경우, 토픽 소유자가 다시 답변을 선택하거나 discobot으로부터 알림을 받게 되기 때문입니다.

아마도 로직을 **답변으로 지정된 게시물이 삭제될 때만** 답변 없음 상태로 변경하도록 수정하는 것이 더 합리적인 접근 방식일 수 있습니다.

수정을 위한 PR은 여기에 제출되었습니다:

> <https://github.com/discourse/discourse/pull/36800>
>
> 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.
> 
> This commit fix this by adding a discrimination logic: only when the post marked as answer is removed will \`unanswer\` be triggered, and the removal of other posts won't do that.
> 
> Before:
> 
> https://github.com/user-attachments/assets/f67fff80-9c63-4762-a47b-4bf30894d4a4
> 
> After:
> 
> https://github.com/user-attachments/assets/1729c9f3-948d-45ed-a00e-8931b4ad2089

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [12월 19, 2025, 5:44오전 UTC](https://meta.discourse.org/t/delete-other-posts-in-a-topic-shouldnt-unanswer-the-answer-post/391717/2 "2025-12-19T05:44:57Z")

</div>

잘 짚어내셨네요, 정말 이상한 버그네요. 작은 테스트 하나 추가해 주실 수 있을까요?

---

<div class="post-metadata">

### Author: ![small-lovely-cat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/small-lovely-cat/32/553546_2.png) [@small-lovely-cat](https://meta.discourse.org/u/small-lovely-cat)
#### Post date: [12월 19, 2025, 6:29오전 UTC](https://meta.discourse.org/t/delete-other-posts-in-a-topic-shouldnt-unanswer-the-answer-post/391717/4 "2025-12-19T06:29:27Z")

</div>

RSpec을 추가했는데, 이제 테스트가 통과한 것 같습니다.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [12월 22, 2025, 2:02오전 UTC](https://meta.discourse.org/t/delete-other-posts-in-a-topic-shouldnt-unanswer-the-answer-post/391717/5 "2025-12-22T02:02:32Z")

</div>


