Conversations must have an id before saving

This commit is contained in:
lilia 2015-02-08 08:43:27 -10:00
parent a7a44e9b99
commit b27826cba5

View file

@ -37,7 +37,7 @@
},
validate: function(attributes, options) {
var required = ['type', 'timestamp'];
var required = ['id', 'type', 'timestamp'];
var missing = _.filter(required, function(attr) { return !attributes[attr]; });
if (missing.length) { return "Conversation must have " + missing; }