mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 02:55:58 +01:00 
			
		
		
		
	content check in posts
This commit is contained in:
		
							
								
								
									
										10
									
								
								src/posts.js
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/posts.js
									
									
									
									
									
								
							| @@ -180,9 +180,17 @@ marked.setOptions({ | ||||
| 				timeout: 2000 | ||||
| 			}); | ||||
| 			return; | ||||
| 		} else if (!content || content.length <= 9) { | ||||
| 			socket.emit('event:alert', { | ||||
| 				type: 'error', | ||||
| 				timeout: 5000, | ||||
| 				title: 'Content too short', | ||||
| 				message: "Please enter a longer post.", | ||||
| 				alert_id: 'post_error' | ||||
| 			}); | ||||
| 			return; | ||||
| 		} | ||||
|  | ||||
|  | ||||
| 		user.getUserField(uid, 'lastposttime', function(lastposttime) { | ||||
|  | ||||
| 			if(Date.now() - lastposttime < config.post_delay) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user