mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
Earlier, when a topic was deleted then UserTopic rows corresponding to that topic were not deleted resulting in a bug where the topic is listed in the '/#settings/topics' panel even after deletion. This commit fixes the incorrect behavior to delete the concerned UserTopic rows. We need to take special care of the case when a topic is deleted in private channel with protected history. We delete the UserTopic records for exactly the users for whom after the topic deletion action, they no longer have access to any messages in the topic.