Improving logic for thread deletion on empty conversation