FIX: Close topics deleted by users and ensure topic stubs are destroyed. (#7430)

This commit is contained in:
Bianca Nenciu
2019-05-07 16:25:52 +03:00
committed by GitHub
parent 1b7be1500f
commit 98a75906c8
3 changed files with 15 additions and 3 deletions

View File

@@ -227,8 +227,8 @@ export default function transformPost(
}
if (postAtts.post_number === 1) {
postAtts.canRecoverTopic = topic.deleted_at && details.can_recover;
postAtts.canDeleteTopic = !topic.deleted_at && details.can_delete;
postAtts.canRecoverTopic = postAtts.isDeleted && details.can_recover;
postAtts.canDeleteTopic = !postAtts.isDeleted && details.can_delete;
postAtts.expandablePost = topic.expandable_first_post;
} else {
postAtts.canRecover = postAtts.isDeleted && postAtts.canRecover;