From 503509fc8fd3d8d1feea59d3ca82c5ed2ef96d16 Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 2 Nov 2015 16:27:42 -0800 Subject: [PATCH] Fix blank lastMessage for non-text messages For non text messages (ex: media messages and group updates), the lastMessage field was being populated with empty string, resulting in an empty message preview in the conversation list. Instead, display 'Media message' or 'Updated the group', etc... // FREEBIE --- js/models/messages.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/models/messages.js b/js/models/messages.js index 18c61b806..06d00d249 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -307,12 +307,12 @@ if (!conversation_timestamp || message.get('sent_at') > conversation_timestamp) { conversation.set({ timestamp: message.get('sent_at'), - lastMessage: message.get('body') + lastMessage: message.getDescription() }); } else if (!conversation.get('lastMessage')) { conversation.set({ - lastMessage: message.get('body') + lastMessage: message.getDescription() }); }