Keep conversation.lastMessage in memory

This commit is contained in:
Scott Nonnenberg 2018-09-20 12:21:23 -07:00
parent ecb126e74c
commit 3464eb65b8
2 changed files with 4 additions and 3 deletions

View file

@ -782,11 +782,12 @@
});
const message = this.addSingleMessage(messageWithSchema);
this.lastMessage = message.getNotificationText();
this.lastMessageStatus = 'sending';
this.save({
active_at: now,
timestamp: now,
lastMessage: message.getNotificationText(),
lastMessageStatus: 'sending',
});
if (this.isPrivate()) {

View file

@ -1205,8 +1205,8 @@
!conversationTimestamp ||
message.get('sent_at') > conversationTimestamp
) {
conversation.lastMessage = message.getNotificationText();
conversation.set({
lastMessage: message.getNotificationText(),
timestamp: message.get('sent_at'),
});
}