mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	compose: Display error for non-admin trying to post to announce_only stream.
Partially fixes #4708. Implements a first version (v1) for the feature. The next step would be to allow admins to toggle `is_announcement_only` in the UI.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							9ad292cf2a
						
					
				
				
					commit
					10a65a62db
				
			@@ -276,6 +276,14 @@ exports.get_invite_only = function (stream_name) {
 | 
			
		||||
    return sub.invite_only;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports.get_announcement_only = function (stream_name) {
 | 
			
		||||
    var sub = exports.get_sub(stream_name);
 | 
			
		||||
    if (sub === undefined) {
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
    return sub.is_announcement_only;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
var default_stream_ids = new Dict();
 | 
			
		||||
 | 
			
		||||
exports.set_realm_default_streams = function (realm_default_streams) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user