diff --git a/js/models/conversations.js b/js/models/conversations.js index d48608044e..a30de0c48d 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -47,7 +47,6 @@ body : message, timestamp : timestamp, conversationId : this.id, - conversationType : this.get('type'), type : 'outgoing', attachments : attachments, }).save(); @@ -68,13 +67,12 @@ var conversation = this; var timestamp = decrypted.pushMessage.timestamp.toNumber(); var m = this.messageCollection.add({ - body: decrypted.message.body, - timestamp: timestamp, - conversationId: this.id, - conversationType: this.get('type'), - attachments: decrypted.message.attachments, - type: 'incoming', - sender: decrypted.pushMessage.source + body : decrypted.message.body, + timestamp : timestamp, + conversationId : this.id, + attachments : decrypted.message.attachments, + type : 'incoming', + sender : decrypted.pushMessage.source }); if (timestamp > this.get('timestamp')) { diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index a3ad0b6c5b..fff899c0b3 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -35,6 +35,10 @@ this.$el.find('.discussion-container').append(this.view.el); this.model.fetchMessages({reset: true}); + + if (this.model.get('type') === 'group') { + this.$el.addClass('group'); + } }, events: { diff --git a/js/views/message_view.js b/js/views/message_view.js index b5e5390edd..edafe6fd36 100644 --- a/js/views/message_view.js +++ b/js/views/message_view.js @@ -61,7 +61,7 @@ message: this.model.get('body'), timestamp: moment(this.model.get('timestamp')).fromNow(), bubble_class: this.model.get('type') === 'outgoing' ? 'sent' : 'incoming', - sender: this.model.get('conversationType') === 'group' ? this.model.get('sender') : '' + sender: this.model.get('sender') }) ); diff --git a/stylesheets/index.css b/stylesheets/index.css index 71708e04d4..d018ab5268 100644 --- a/stylesheets/index.css +++ b/stylesheets/index.css @@ -43,10 +43,16 @@ ul.discussion { } li.entry .sender { + display: none; font-size: 0.75em; opacity: 0.54; } +.group.conversation li.entry .sender { + display: block; +} + + li.entry .avatar { height:32px; width:32px;