mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
Added Error for Trying to Post Empty Comments
This commit is contained in:
parent
2fe94d611f
commit
21fce4c813
1 changed files with 4 additions and 0 deletions
|
@ -39,6 +39,10 @@ Meteor.methods({
|
|||
if(!this.isSimulation && (timeSinceLastComment < commentInterval))
|
||||
throw new Meteor.Error(704, 'Please wait '+(commentInterval-timeSinceLastComment)+' seconds before commenting again');
|
||||
|
||||
// Don't allow empty comments
|
||||
if (!cleanText)
|
||||
throw new Meteor.Error(704,'Your comment is empty.');
|
||||
|
||||
var comment = {
|
||||
post: postId,
|
||||
body: cleanText,
|
||||
|
|
Loading…
Add table
Reference in a new issue