|
|
@ -180,9 +180,17 @@ marked.setOptions({
|
|
|
|
timeout: 2000
|
|
|
|
timeout: 2000
|
|
|
|
});
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
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) {
|
|
|
|
user.getUserField(uid, 'lastposttime', function(lastposttime) {
|
|
|
|
|
|
|
|
|
|
|
|
if(Date.now() - lastposttime < config.post_delay) {
|
|
|
|
if(Date.now() - lastposttime < config.post_delay) {
|
|
|
|