parent
ba22151a31
commit
172d843368
1 changed files with 4 additions and 7 deletions
|
@ -347,15 +347,12 @@
|
|||
var conversation_timestamp = conversation.get('timestamp');
|
||||
if (!conversation_timestamp || message.get('sent_at') > conversation_timestamp) {
|
||||
conversation.set({
|
||||
timestamp: message.get('sent_at'),
|
||||
lastMessage: message.getNotificationText()
|
||||
});
|
||||
}
|
||||
else if (!conversation.get('lastMessage')) {
|
||||
conversation.set({
|
||||
lastMessage: message.getNotificationText()
|
||||
timestamp: message.get('sent_at')
|
||||
});
|
||||
}
|
||||
conversation.set({
|
||||
lastMessage: message.getNotificationText()
|
||||
});
|
||||
|
||||
message.save().then(function() {
|
||||
conversation.save().then(function() {
|
||||
|
|
Loading…
Reference in a new issue