diff --git a/js/models/conversations.js b/js/models/conversations.js index 520deffa..7aeb8b18 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -24,7 +24,6 @@ defaults: function() { var timestamp = new Date().getTime(); return { - image : '/images/default.png', unreadCount : 0, timestamp : timestamp, active_at : timestamp @@ -36,7 +35,7 @@ }, validate: function(attributes, options) { - var required = ['type', 'timestamp', 'image']; + var required = ['type', 'timestamp']; 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 62b7cca1..d60e1409 100644 --- a/js/views/conversation_list_item_view.js +++ b/js/views/conversation_list_item_view.js @@ -41,6 +41,11 @@ var Whisper = Whisper || {}; new Whisper.AttachmentView({model: this.model.get('avatar')}).render().el ); } + else { + this.$el.find('.avatar').append( + $('').attr('src', '/images/default.png') + ); + } return this; }