Update conversation lastMessage from database
Don't set lastMessage, let it update itself as needed, such as when first rendering a conversation list item, and when its messages are sent, received, or destroyed.
This commit is contained in:
@@ -424,10 +424,6 @@
|
||||
timestamp: message.get('sent_at')
|
||||
});
|
||||
}
|
||||
conversation.set({
|
||||
lastMessage: message.getNotificationText()
|
||||
});
|
||||
|
||||
message.save().then(function() {
|
||||
conversation.save().then(function() {
|
||||
conversation.trigger('newmessage', message);
|
||||
|
Reference in New Issue
Block a user