Fix new conversation with no lastMessage

This commit is contained in:
lilia 2015-08-27 18:02:39 -07:00
parent 5b430fa8aa
commit 89f5f216ed

View file

@ -217,6 +217,11 @@
lastMessage: message.get('body')
});
}
else if (!conversation.get('lastMessage')) {
conversation.set({
lastMessage: message.get('body')
});
}
conversation.save().then(function() {
message.save().then(function() {