mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	typing: Fix wrong type annotations for mute_stream.
This is a part of djang-stubs refactorings. Signed-off-by: Zixuan James Li <359101898@qq.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							4cf3ba5744
						
					
				
				
					commit
					d46f7566dd
				
			@@ -81,7 +81,7 @@ def get_recipient_id_for_stream_name(realm: Realm, stream_name: str) -> Optional
 | 
			
		||||
    return stream.recipient.id if stream.recipient is not None else None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def mute_stream(realm: Realm, user_profile: str, stream_name: str) -> None:
 | 
			
		||||
def mute_stream(realm: Realm, user_profile: UserProfile, stream_name: str) -> None:
 | 
			
		||||
    stream = get_stream(stream_name, realm)
 | 
			
		||||
    recipient = stream.recipient
 | 
			
		||||
    subscription = Subscription.objects.get(recipient=recipient, user_profile=user_profile)
 | 
			
		||||
 
 | 
			
		||||
@@ -1408,7 +1408,7 @@ class PersonalMessagesFlagTest(ZulipTestCase):
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class MarkUnreadTest(ZulipTestCase):
 | 
			
		||||
    def mute_stream(self, stream_name: str, user: int) -> None:
 | 
			
		||||
    def mute_stream(self, stream_name: str, user: UserProfile) -> None:
 | 
			
		||||
        realm = get_realm("zulip")
 | 
			
		||||
        stream = get_stream(stream_name, realm)
 | 
			
		||||
        recipient = stream.recipient
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user