mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
restore default avatars
This commit is contained in:
@@ -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; }
|
||||
},
|
||||
|
||||
@@ -41,6 +41,11 @@ var Whisper = Whisper || {};
|
||||
new Whisper.AttachmentView({model: this.model.get('avatar')}).render().el
|
||||
);
|
||||
}
|
||||
else {
|
||||
this.$el.find('.avatar').append(
|
||||
$('<img>').attr('src', '/images/default.png')
|
||||
);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user