Don't warn on missing message bodies

A message can be blank if it has an attachment
This commit is contained in:
lilia 2014-10-29 20:29:36 -07:00
parent df0eaf622a
commit 9c568ed0b8

View file

@ -5,7 +5,7 @@ var Whisper = Whisper || {};
var Message = Backbone.Model.extend({
validate: function(attributes, options) {
var required = ['body', 'timestamp', 'threadId'];
var required = ['timestamp', 'threadId'];
var missing = _.filter(required, function(attr) { return !attributes[attr]; });
if (missing.length) { console.log("Message missing attributes: " + missing); }
},