Remove spurious update to conversation on delivery receipts

Previously this would trigger the conversation to refresh it's last
message.

// FREEBIE
This commit is contained in:
lilia 2017-02-22 13:20:04 -08:00
parent b7fac17ec8
commit 0e31644c28
2 changed files with 5 additions and 1 deletions

View file

@ -69,7 +69,7 @@
message.get('conversationId')
);
if (conversation) {
conversation.trigger('newmessage', message);
conversation.trigger('delivered', message);
}
});
// TODO: consider keeping a list of numbers we've

View file

@ -80,6 +80,7 @@
this.listenTo(this.model, 'change:color', this.updateColor);
this.listenTo(this.model, 'change:name', this.updateTitle);
this.listenTo(this.model, 'newmessage', this.addMessage);
this.listenTo(this.model, 'delivered', this.updateMessage);
this.listenTo(this.model, 'opened', this.onOpened);
this.listenTo(this.model, 'expired', this.onExpired);
this.listenTo(this.model.messageCollection, 'expired', this.onExpiredCollection);
@ -237,6 +238,9 @@
this.markRead();
}
},
updateMessage: function(message) {
this.model.messageCollection.add(message, {merge: true});
},
viewMembers: function() {
return this.model.fetchContacts().then(function() {