fix: apply message serialization fix everywhere
Moving this to a serializer function like done with a couple other models guarantees getting messages with pending acks won't fail elsewhere. It also sets it up so the we can add/remove properties on the Message model as needed in the future.
related: 51a1028588
This commit is contained in:
parent
51a1028588
commit
ba6ec7feab
1 changed files with 13 additions and 7 deletions
|
|
@ -162,7 +162,7 @@ class Chat extends Base {
|
|||
}
|
||||
|
||||
msgs.sort((a, b) => (a.t > b.t) ? 1 : -1);
|
||||
return msgs.splice(msgs.length - limit).map(m => m.serialize());
|
||||
return msgs.splice(msgs.length - limit).map(m => window.WWebJS.getMessageModel(m));
|
||||
|
||||
}, this.id._serialized, searchOptions.limit);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue