From 48b0e8832d5ccab1e9c824c26c42201039f657b4 Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 23 Mar 2015 16:12:25 -0700 Subject: [PATCH] Fix message detail contacts for incoming group message Previously the From-field displayed all the group contacts. --- js/views/message_detail_view.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/js/views/message_detail_view.js b/js/views/message_detail_view.js index c48949f7933..d3311286014 100644 --- a/js/views/message_detail_view.js +++ b/js/views/message_detail_view.js @@ -99,12 +99,20 @@ })); this.view.render().$el.prependTo(this.$el.find('.message-container')); - this.conversation.contactCollection.each(function(contact) { + if (this.model.isOutgoing()) { + this.conversation.contactCollection.each(function(contact) { + var v = new ContactView({ + model: contact, + conflict: this.model.getKeyConflict(contact.id) + }).render().$el.appendTo(this.$el.find('.contacts')); + }.bind(this)); + } else { + var contact = this.conversation.contactCollection.get(this.model.get('source')); var v = new ContactView({ model: contact, conflict: this.model.getKeyConflict(contact.id) }).render().$el.appendTo(this.$el.find('.contacts')); - }.bind(this)); + } } });