mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	notifications: Fix unnecessary wildcard mention notifications.
This fixes a bug where email notifications were sent for wildcard mentions even if the `enable_offline_email_notifications` setting was turned off. This was because the `notification_data` class incorrectly considered `wildcard_mentions_notify` as an indeoendent setting, instead of a wrapper around `enable_offline_email_notifications` and `enable_offline_push_notifications`. Also add a test for this case.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							ec354ee013
						
					
				
				
					commit
					ac70a2d2e1
				
			@@ -762,9 +762,10 @@ def missedmessage_hook(
 | 
			
		||||
            pm_email_notify=internal_data.get("pm_email_notify", False),
 | 
			
		||||
            mention_push_notify=internal_data.get("mention_push_notify", False),
 | 
			
		||||
            mention_email_notify=internal_data.get("mention_email_notify", False),
 | 
			
		||||
            wildcard_mention_push_notify=internal_data.get("wildcard_mention_push_notify", False),
 | 
			
		||||
            wildcard_mention_email_notify=internal_data.get("wildcard_mention_email_notify", False),
 | 
			
		||||
            stream_push_notify=internal_data.get("stream_push_notify", False),
 | 
			
		||||
            stream_email_notify=internal_data.get("stream_email_notify", False),
 | 
			
		||||
            wildcard_mention_notify=internal_data.get("wildcard_mention_notify", False),
 | 
			
		||||
            # Since one is by definition idle, we don't need to check online_push_enabled
 | 
			
		||||
            online_push_enabled=False,
 | 
			
		||||
        )
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user