mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
What is the context for this change? Prior to this change, there is a bug in `TopicsController#reset_new` where it does not dismiss new topics in sub-subcategories when the `category_id` and `include_subcategories=true` params are present. This is because the controller did not account for sub-subcategories when fetching the category ids of the new topics that should be dismissed. This commit fixes the problem by relying on the `Category.subcategory_ids` class method which accounts for sub-subcategories.