mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	zerver: API to create channel.
Fixes #16206. Co-authored-by: Sahil Batra <sahil@zulip.com> Co-authored-by: Steve Howell <showell@zulip.com> Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							6ef2591b47
						
					
				
				
					commit
					6203861529
				
			@@ -13,6 +13,7 @@ from zerver.lib.default_streams import get_default_stream_ids_for_realm
 | 
			
		||||
from zerver.lib.exceptions import (
 | 
			
		||||
    CannotAdministerChannelError,
 | 
			
		||||
    CannotSetTopicsPolicyError,
 | 
			
		||||
    ChannelExistsError,
 | 
			
		||||
    IncompatibleParametersError,
 | 
			
		||||
    JsonableError,
 | 
			
		||||
    OrganizationOwnerRequiredError,
 | 
			
		||||
@@ -992,7 +993,7 @@ def check_stream_name_available(realm: Realm, name: str) -> None:
 | 
			
		||||
    check_stream_name(name)
 | 
			
		||||
    try:
 | 
			
		||||
        get_stream(name, realm)
 | 
			
		||||
        raise JsonableError(_("Channel name is already in use."))
 | 
			
		||||
        raise ChannelExistsError(name)
 | 
			
		||||
    except Stream.DoesNotExist:
 | 
			
		||||
        pass
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user