mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 06:27:25 +08:00

The previous query would look at the existing messages, count them, and update the associated thread. But, if for some reason messages were **ALL** deleted without updating the `replies_count`, then the query wouldn't find any message, and wouldn't update any thread's `replies_count`.