Don't require a conversation name

Just display a sensible default in the frontend if it's unset.
For private conversations this should be the phone number, for
groups, the list of numbers.
This commit is contained in:
lilia 2014-12-24 14:22:25 -08:00
parent ff259a7dee
commit 0ea176dfa0
3 changed files with 2 additions and 4 deletions

View file

@ -24,7 +24,6 @@
defaults: function() {
var timestamp = new Date().getTime();
return {
name : 'New Conversation',
image : '/images/default.png',
unreadCount : 0,
timestamp : timestamp,
@ -37,7 +36,7 @@
},
validate: function(attributes, options) {
var required = ['type', 'timestamp', 'image', 'name'];
var required = ['type', 'timestamp', 'image'];
var missing = _.filter(required, function(attr) { return !attributes[attr]; });
if (missing.length) { return "Conversation must have " + missing; }
},