From fd5b0aeb85e13512a514ecbc686080cc833a10cb Mon Sep 17 00:00:00 2001 From: lilia Date: Wed, 22 Jul 2015 15:24:03 -0700 Subject: [PATCH] Set lastmessage text on convo's with no timestamp --- js/models/messages.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/models/messages.js b/js/models/messages.js index 343c2806..a45b5315 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -209,7 +209,8 @@ errors : [] }); - if (message.get('sent_at') > conversation.get('timestamp')) { + var conversation_timestamp = conversation.get('timestamp'); + if (!conversation_timestamp || message.get('sent_at') > conversation_timestamp) { conversation.set({ timestamp: message.get('sent_at'), lastMessage: message.get('body')