Set lastmessage text on convo's with no timestamp

This commit is contained in:
lilia 2015-07-22 15:24:03 -07:00
parent 17e515f886
commit fd5b0aeb85

View file

@ -209,7 +209,8 @@
errors : [] 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({ conversation.set({
timestamp: message.get('sent_at'), timestamp: message.get('sent_at'),
lastMessage: message.get('body') lastMessage: message.get('body')