Don't warn on missing message bodies
A message can be blank if it has an attachment
This commit is contained in:
parent
df0eaf622a
commit
9c568ed0b8
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ var Whisper = Whisper || {};
|
||||||
|
|
||||||
var Message = Backbone.Model.extend({
|
var Message = Backbone.Model.extend({
|
||||||
validate: function(attributes, options) {
|
validate: function(attributes, options) {
|
||||||
var required = ['body', 'timestamp', 'threadId'];
|
var required = ['timestamp', 'threadId'];
|
||||||
var missing = _.filter(required, function(attr) { return !attributes[attr]; });
|
var missing = _.filter(required, function(attr) { return !attributes[attr]; });
|
||||||
if (missing.length) { console.log("Message missing attributes: " + missing); }
|
if (missing.length) { console.log("Message missing attributes: " + missing); }
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue