mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
This commit updates the logic for migrating user_topic rows during the move-messages operation when the target topic already has messages. Previously, the target_topic's visibility_policy was simply set to the original_topic's visibility_policy, and the original_topic's visibility_policy was set to INHERIT. This commit updates the move-messages code path to determine the new visibility_policy depending on the visibility policies of the original and target topics. The target_topic's visibility_policy is then updated. The number of db queries has increased by two: One query corresponds to determining if 'target_topic_has_messages'. Another query corresponds to 'get_users_with_user_topic_visibility_policy' to determine 'target_topic_user_profile_to_visibility_policy'.
173 KiB
173 KiB