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);
|
const message = this.addSingleMessage(messageWithSchema);
|
||||||
|
this.lastMessage = message.getNotificationText();
|
||||||
|
this.lastMessageStatus = 'sending';
|
||||||
|
|
||||||
this.save({
|
this.save({
|
||||||
active_at: now,
|
active_at: now,
|
||||||
timestamp: now,
|
timestamp: now,
|
||||||
lastMessage: message.getNotificationText(),
|
|
||||||
lastMessageStatus: 'sending',
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.isPrivate()) {
|
if (this.isPrivate()) {
|
||||||
|
|
|
@ -1205,8 +1205,8 @@
|
||||||
!conversationTimestamp ||
|
!conversationTimestamp ||
|
||||||
message.get('sent_at') > conversationTimestamp
|
message.get('sent_at') > conversationTimestamp
|
||||||
) {
|
) {
|
||||||
|
conversation.lastMessage = message.getNotificationText();
|
||||||
conversation.set({
|
conversation.set({
|
||||||
lastMessage: message.getNotificationText(),
|
|
||||||
timestamp: message.get('sent_at'),
|
timestamp: message.get('sent_at'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue