Keep conversation.lastMessage in memory
This commit is contained in:
@@ -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'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user