Ok I’ve been testing this and checked with one of our developer managers, and confirmed it is by design and not a bug. A topic post can be deleted if in the first 24 hours after creation, but only before someone else replies. If a reply is posted, topic cannot be deleted and a modal pops up.
The second OR clause there, is_my_own?(topic) && topic.posts_count <= 1 && topic.created_at && topic.created_at > 24.hours.ago does NOT use a specific site setting. Thus, users can delete their own topic regardless of the post_deletions site settings within the first 24 hours of creation (and before someone else replies).
This is the pop up message if a reply is posted to the topic trying to be deleted
Keep in mind that users deleting content is soft deletion. Staff can still see the topics and restore them if necessary. All deleted topics on your forum can be found by admins and mods at https://your-forum-url/latest?status=deleted.
