mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
delete_topic: Delete UserTopic rows when a topic is deleted.
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.
This commit is contained in:
committed by
Tim Abbott
parent
d0730131a2
commit
31b3842c9b
@@ -246,6 +246,7 @@ python_rules = RuleList(
|
||||
"exclude": FILES_WITH_LEGACY_SUBJECT,
|
||||
"exclude_line": {
|
||||
("zerver/lib/message.py", "message__subject__iexact=message.topic_name(),"),
|
||||
("zerver/views/streams.py", "message__subject__iexact=topic_name,"),
|
||||
},
|
||||
"include_only": {
|
||||
"zerver/data_import/",
|
||||
|
Reference in New Issue
Block a user