Skip to content

Commit

Permalink
perf: Removido chat da serialização de mensagem para maior desempenho (
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Jul 2, 2021
1 parent 3f6daaf commit 69df15c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/lib/wapi/serializers/serialize-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export const _serializeMessageObj = (obj) => {
if (obj == undefined) {
return null;
}
const _chat = obj['chat'] ? WAPI._serializeChatObj(obj['chat']) : {};
if (obj.quotedMsg) obj.quotedMsgObj();
return Object.assign(window.WAPI._serializeRawObj(obj), {
id: obj.id._serialized,
Expand Down Expand Up @@ -58,13 +57,11 @@ export const _serializeMessageObj = (obj) => {
isNotification: obj.isNotification,
isPSA: obj.isPSA,
type: obj.type,
chat: _chat,
quotedMsgId: obj._quotedMsgObj
? obj._quotedMsgObj.id
? obj._quotedMsgObj.id._serialized
: obj._quotedMsgObj.id._serialized
: undefined,
mediaData: window.WAPI._serializeRawObj(obj['mediaData']),
reply: (body) => window.WAPI.reply(_chat.id._serialized, body, obj),
});
};

0 comments on commit 69df15c

Please sign in to comment.