Skip to content

Commit

Permalink
fix not sending message bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Briuor committed Oct 29, 2020
1 parent 2d0a65b commit 033032d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 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 @@ -7,7 +7,7 @@
},
"name": "wbm",
"description": "wbm is an API to send bulk messages in whatsapp.",
"version": "1.1.11",
"version": "1.1.12",
"main": "src/index.js",
"devDependencies": {},
"repository": {
Expand Down
3 changes: 1 addition & 2 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ async function sendTo(phoneOrContact, message) {
process.stdout.write("Sending Message...\r");
await page.goto(`https://web.whatsapp.com/send?phone=${phone}&text=${encodeURIComponent(message)}`);
await page.waitForSelector("div#startup", { hidden: true, timeout: 60000 });
await page.waitForSelector('div[data-tab="1"]', { timeout: 5000 });

await page.waitForSelector('div[tabindex="-1"]', { timeout: 5000 });
await page.keyboard.press("Enter");
await page.waitFor(1000);
process.stdout.clearLine();
Expand Down

0 comments on commit 033032d

Please sign in to comment.