Keep conversation.lastMessage in memory
This commit is contained in:
parent
ecb126e74c
commit
3464eb65b8
2 changed files with 4 additions and 3 deletions
|
@ -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()) {
|
||||
|
|
|
@ -1205,8 +1205,8 @@
|
|||
!conversationTimestamp ||
|
||||
message.get('sent_at') > conversationTimestamp
|
||||
) {
|
||||
conversation.lastMessage = message.getNotificationText();
|
||||
conversation.set({
|
||||
lastMessage: message.getNotificationText(),
|
||||
timestamp: message.get('sent_at'),
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue