Skip to content

Commit a3b412b

Browse files
committed
wwebjs 1.23.1-alpha.5
1 parent d1691b4 commit a3b412b

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"qr-image": "^3.2.0",
1717
"qrcode-terminal": "^0.12.0",
1818
"swagger-ui-express": "^4.6.3",
19-
"whatsapp-web.js": "1.23.1-alpha.4"
19+
"whatsapp-web.js": "1.23.1-alpha.5"
2020
},
2121
"devDependencies": {
2222
"eslint": "^8.38.0",

src/controllers/clientController.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ const sendMessage = async (req, res) => {
107107
break
108108
}
109109
case 'Contact': {
110-
const contact = await client.getContactById(typeof content.contactId === 'number' ? content.contactId + '@c.us' : content.contactId)
110+
const contactId = content.contactId.endsWith('@c.us') ? content.contactId : `${content.contactId}@c.us`
111+
const contact = await client.getContactById(contactId)
111112
messageOut = await client.sendMessage(chatId, contact, options)
112113
break
113114
}

0 commit comments

Comments
 (0)