mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	request: Remove ExtractRecipients type safety hole on REQ.
It was allowing us to get away with wrong types on a few functions: `check_send_typing_notification` and `send_notification_backend` can be (and are) called with a list of `int` as `notification_to`, not just a list of `str`. The problem it was working around already had a better solution using the dummy `type` argument. Use that. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							92e34bbb10
						
					
				
				
					commit
					13a2ac7b8e
				
			@@ -1682,7 +1682,7 @@ def do_send_typing_notification(realm: Realm, notification: Dict[str, Any]) -> N
 | 
			
		||||
 | 
			
		||||
# check_send_typing_notification:
 | 
			
		||||
# Checks the typing notification and sends it
 | 
			
		||||
def check_send_typing_notification(sender: UserProfile, notification_to: Sequence[str],
 | 
			
		||||
def check_send_typing_notification(sender: UserProfile, notification_to: Union[Sequence[str], Sequence[int]],
 | 
			
		||||
                                   operator: str) -> None:
 | 
			
		||||
    typing_notification = check_typing_notification(sender, notification_to, operator)
 | 
			
		||||
    do_send_typing_notification(sender.realm, typing_notification)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user