mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	removed socket emits for post errors
This commit is contained in:
		| @@ -314,37 +314,9 @@ function emitOnlineUserCount(callback) { | ||||
| 	} | ||||
| } | ||||
|  | ||||
| Sockets.emitAlert = emitAlert; | ||||
| function emitAlert(socket, title, message) { | ||||
| 	socket.emit('event:alert', { | ||||
| 		type: 'danger', | ||||
| 		timeout: 2000, | ||||
| 		title: title, | ||||
| 		message: message, | ||||
| 		alert_id: 'post_error' | ||||
| 	}); | ||||
| } | ||||
|  | ||||
| Sockets.emitContentTooShortAlert = emitContentTooShortAlert; | ||||
| function emitContentTooShortAlert(socket) { | ||||
| 	socket.emit('event:alert', { | ||||
| 		type: 'danger', | ||||
| 		timeout: 2000, | ||||
| 		title: 'Content too short', | ||||
| 		message: "Please enter a longer post. At least " + meta.config.minimumPostLength + " characters.", | ||||
| 		alert_id: 'post_error' | ||||
| 	}); | ||||
| } | ||||
|  | ||||
| Sockets.emitTooManyPostsAlert = emitTooManyPostsAlert; | ||||
| function emitTooManyPostsAlert(socket) { | ||||
| 	socket.emit('event:alert', { | ||||
| 		title: 'Too many posts!', | ||||
| 		message: 'You can only post every ' + meta.config.postDelay + ' seconds.', | ||||
| 		type: 'danger', | ||||
| 		timeout: 2000 | ||||
| 	}); | ||||
| } | ||||
|  | ||||
|  | ||||
| /* Exporting */ | ||||
| module.exports = Sockets; | ||||
		Reference in New Issue
	
	Block a user