Render group members in the message detail view

This requires that we fetch contact info when opening a conversation
so that's available for rendering contact names and avatars.
This commit is contained in:
lilia 2015-02-24 16:02:33 -08:00
parent 2277b41639
commit c08c29bd4a
5 changed files with 37 additions and 10 deletions

View file

@ -37,10 +37,12 @@
sent_at: moment(this.model.get('sent_at')).toString(),
received_at: moment(this.model.get('received_at')).toString(),
tofrom: this.model.isIncoming() ? 'From' : 'To',
contacts: {
name : this.conversation.getTitle(),
avatar : this.conversation.get('avatar')
}
contacts: this.conversation.contactCollection.map(function(contact) {
return {
name : contact.getTitle(),
avatar : contact.get('avatar'),
};
}.bind(this))
}));
this.view.render().$el.prependTo(this.$el.find('.message-container'));
}