Skip to content

Commit

Permalink
wwebjs 1.23.1-alpha.5
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishubert committed Mar 3, 2024
1 parent d1691b4 commit a3b412b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"qr-image": "^3.2.0",
"qrcode-terminal": "^0.12.0",
"swagger-ui-express": "^4.6.3",
"whatsapp-web.js": "1.23.1-alpha.4"
"whatsapp-web.js": "1.23.1-alpha.5"
},
"devDependencies": {
"eslint": "^8.38.0",
Expand Down
3 changes: 2 additions & 1 deletion src/controllers/clientController.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ const sendMessage = async (req, res) => {
break
}
case 'Contact': {
const contact = await client.getContactById(typeof content.contactId === 'number' ? content.contactId + '@c.us' : content.contactId)
const contactId = content.contactId.endsWith('@c.us') ? content.contactId : `${content.contactId}@c.us`
const contact = await client.getContactById(contactId)
messageOut = await client.sendMessage(chatId, contact, options)
break
}
Expand Down

0 comments on commit a3b412b

Please sign in to comment.