Plumb contact avatars into conversations
This commit is contained in:
parent
019a9d1fbc
commit
8e54aa1401
6 changed files with 31 additions and 9 deletions
|
@ -42,6 +42,9 @@
|
|||
},
|
||||
isIncoming: function() {
|
||||
return this.get('type') === 'incoming';
|
||||
},
|
||||
getContact: function() {
|
||||
return this.collection.conversation.contactCollection.get(this.get('source'));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -50,6 +53,11 @@
|
|||
database : Whisper.Database,
|
||||
storeName : 'messages',
|
||||
comparator : 'received_at',
|
||||
initialize : function(models, options) {
|
||||
if (options) {
|
||||
this.conversation = options.conversation;
|
||||
}
|
||||
},
|
||||
destroyAll : function () {
|
||||
return Promise.all(this.models.map(function(m) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue