diff --git a/js/background.js b/js/background.js index f4f04ec7c..ecccb3d74 100644 --- a/js/background.js +++ b/js/background.js @@ -141,7 +141,6 @@ }; } else { attributes = { - name : source, type : 'private' }; } diff --git a/js/models/conversations.js b/js/models/conversations.js index bc5890afc..812e7d078 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -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; } }, diff --git a/js/views/conversation_list_item_view.js b/js/views/conversation_list_item_view.js index ea31f8dc8..1f167d80c 100644 --- a/js/views/conversation_list_item_view.js +++ b/js/views/conversation_list_item_view.js @@ -31,7 +31,7 @@ var Whisper = Whisper || {}; render: function() { this.$el.html( Mustache.render(this.template, { - contact_name: this.model.get('name'), + contact_name: this.model.get('name') || this.model.get('members') || this.model.id, contact_avatar: this.model.get('image'), last_message: this.model.get('lastMessage'), last_message_timestamp: moment(this.model.get('timestamp')).format('MMM D')