Skip to content

Commit

Permalink
Merge pull request #602 from allgood/fix-600
Browse files Browse the repository at this point in the history
Ignore whatsapp-web.js type definition - Fix #600
  • Loading branch information
w3nder authored Feb 22, 2024
2 parents 67b6094 + 3695e65 commit 1c64303
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/src/services/WbotServices/wbotMessageListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ const verifyMessage = async (
quotedMsgId: quotedMsg?.id
};

// temporaryly disable ts checks because of type definition bug for Location object
// @ts-ignore
await ticket.update({ lastMessage: msg.type === "location" ? msg.location.description ? "Localization - " + msg.location.description.split('\\n')[0] : "Localization" : msg.body });

await CreateMessageService({ messageData });
Expand All @@ -159,6 +161,8 @@ const prepareLocation = (msg: WbotMessage): WbotMessage => {

msg.body = "data:image/png;base64," + msg.body + "|" + gmapsUrl;

// temporaryly disable ts checks because of type definition bug for Location object
// @ts-ignore
msg.body += "|" + (msg.location.description ? msg.location.description : (msg.location.latitude + ", " + msg.location.longitude))

return msg;
Expand Down

0 comments on commit 1c64303

Please sign in to comment.