mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +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