Skip to content

Commit

Permalink
fix: body
Browse files Browse the repository at this point in the history
  • Loading branch information
jonalan7 committed Oct 24, 2021
1 parent 0d109df commit 242df0b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/wapi/serializers/serialize-contact.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,14 @@ export const _serializeContactObj = (obj) => {

return Object.assign(window.WAPI._serializeRawObj(obj), {
formattedName: obj.formattedName,
displayName: obj.displayName,
formattedShortName: obj.formattedShortName,
formattedShortNameWithNonBreakingSpaces:
obj.formattedShortNameWithNonBreakingSpaces,
isHighLevelVerified: obj.isHighLevelVerified,
isMe: obj.isMe,
mentionName: obj.mentionName,
notifyName: obj.notifyName,
isMyContact: obj.isMyContact,
isPSA: obj.isPSA,
isUser: obj.isUser,
Expand Down
9 changes: 9 additions & 0 deletions src/lib/wapi/serializers/serialize-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export const _serializeMessageObj = (obj) => {
sender: obj.senderObj ? WAPI._serializeContactObj(obj.senderObj) : null,
timestamp: obj.t,
content: obj.body,
body: obj.body,
isGroupMsg: obj.isGroupMsg,
isLink: obj.isLink,
isMMS: obj.isMMS,
Expand All @@ -108,6 +109,14 @@ export const _serializeMessageObj = (obj) => {
mediaKey: obj.mediaKey,
size: obj.size,
t: obj.t,
isNewMsg: obj.isNewMsg,
linkPreview: obj.linkPreview,
text: obj.text,
height: obj.height,
width: obj.width,
self: obj.self,
initialPageSize: obj.initialPageSize,

reply: (body) => window.WAPI.reply(_chat.id._serialized, body, obj)
};

Expand Down

1 comment on commit 242df0b

@jonalan7
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.