mirror of https://github.com/zulip/zulip.git
d645d5c0ec
The code for updating visibility policy values on moving messages had two bugs. - There was a typo in elif condition where "user_profile" was being used instead of "user_profile_with_policy". This commit fixes the typo. - It was assumed that there would be no UserTopic rows for target topic if the target topic didn't exist. But there can be such case where some messages were sent to that topic and the user muted the topic. But then the messages in that topic was deleted. In such case there can be UserTopic rows for a stream-topic pair that does not exist. This commit fixes the code to handle such case as well and set the visibility policy of new topic to what was set for the original topic. This change simplifies the condition to just check whether new_visibility_policy is equal to target_topic_visibility_policy and skip if so, and update the visibility policy otherwise. Due to this change, we now do not try to mute the already muted topic if the topic is moved to a topic which didn't exist previously and thus we modify the existing test to not expect any INFO logs. |
||
---|---|---|
.. | ||
__init__.py | ||
alert_words.py | ||
bots.py | ||
create_realm.py | ||
create_user.py | ||
custom_profile_fields.py | ||
default_streams.py | ||
hotspots.py | ||
invites.py | ||
message_delete.py | ||
message_edit.py | ||
message_flags.py | ||
message_send.py | ||
muted_users.py | ||
presence.py | ||
reactions.py | ||
realm_domains.py | ||
realm_emoji.py | ||
realm_export.py | ||
realm_icon.py | ||
realm_linkifiers.py | ||
realm_logo.py | ||
realm_playgrounds.py | ||
realm_settings.py | ||
scheduled_messages.py | ||
streams.py | ||
submessage.py | ||
typing.py | ||
uploads.py | ||
user_activity.py | ||
user_groups.py | ||
user_settings.py | ||
user_status.py | ||
user_topics.py | ||
users.py | ||
video_calls.py |