mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	UserTopic: Set visibility_policy or delete UserTopic row without error.
This commit updates 'set_user_topic_visibility_policy_in_database' to not raise an error when deleting a UserTopic row and the user doesn't have a visibility_policy for the topic yet, or when setting the visibility_policy to its current value. Also, it includes the changes to not send unnecessary events in such cases.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							f783e8b6ca
						
					
				
				
					commit
					042bbf2936
				
			@@ -809,7 +809,6 @@ def do_update_message(
 | 
			
		||||
                    new_stream if new_stream is not None else stream_being_edited,
 | 
			
		||||
                    topic_name if topic_name is not None else orig_topic_name,
 | 
			
		||||
                    visibility_policy=UserTopic.VisibilityPolicy.MUTED,
 | 
			
		||||
                    ignore_duplicate=True,
 | 
			
		||||
                )
 | 
			
		||||
 | 
			
		||||
    send_event(user_profile.realm, event, users_to_be_notified)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user