Skip to content

Commit

Permalink
Make index_jsdemo.js stable (#340)
Browse files Browse the repository at this point in the history
* remove unnecessary require calls
* update whatsapp version for QR init message
  • Loading branch information
nikneym authored Sep 1, 2021
1 parent 4853ada commit 2911acd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion client/login-via-js-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
if(e.data == "whatsapp_open") {
console.log("connection to whatsapp opened.");
loginMessageTag = +new Date();
whatsapp.send(`${loginMessageTag},["admin","init",[0,3,2390],["Long browser description","ShortBrowserDesc"],"${clientId}",true]`);
whatsapp.send(`${loginMessageTag},["admin","init",[2,2121,6],["Long browser description","ShortBrowserDesc"],"${clientId}",true]`);
}
else {
if(typeof e.data == "string") {
Expand Down
5 changes: 0 additions & 5 deletions index_jsdemo.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
let _ = require("lodash");
let fs = require("fs");
let path = require("path");
let WebSocket = require("ws");



let wss = new WebSocket.Server({ port: 2021 });
console.log("whatsapp-web-reveng jsdemo server listening on port 2021");

Expand Down

0 comments on commit 2911acd

Please sign in to comment.