lastMessage in chat (#1606)
* lastMessage in chat * lastMessage info * Update src/util/Injected.js Co-authored-by: Rajeh Taher <rajeh@reforward.dev> * fix serialize msg * markup --------- Co-authored-by: tofers <tofers90> Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
This commit is contained in:
parent
780005a81a
commit
812ff0ddfc
3 changed files with 17 additions and 1 deletions
|
|
@ -427,7 +427,15 @@ exports.LoadUtils = () => {
|
|||
await window.Store.GroupMetadata.update(chatWid);
|
||||
res.groupMetadata = chat.groupMetadata.serialize();
|
||||
}
|
||||
|
||||
|
||||
res.lastMessage = null;
|
||||
if (res.msgs && res.msgs.length) {
|
||||
const lastMessage = window.Store.Msg.get(chat.lastReceivedKey._serialized);
|
||||
if (lastMessage) {
|
||||
res.lastMessage = window.WWebJS.getMessageModel(lastMessage);
|
||||
}
|
||||
}
|
||||
|
||||
delete res.msgs;
|
||||
delete res.msgUnsyncedButtonReplyMsgs;
|
||||
delete res.unsyncedButtonReplies;
|
||||
|
|
|
|||
Loading…
Reference in a new issue