User permissions added
This commit is contained in:
parent
65484961e2
commit
bed8cf1ea2
@ -9,7 +9,7 @@ Missing Nodes ? : To avoid long names, Node names are updated. If some node are
|
||||

|
||||
|
||||
1. Deploy whatsapp admin node (along with whatsappLink node).
|
||||
2. whatsappLink node will initilize, connect with whatsapp and generate a <b>QR code below the Admin Node </b> and in terminal also.
|
||||
2. whatsappLink node will initilize, connect with whatsapp and generate a <b>QR code below the Admin Node </b> (in terminal also).
|
||||
3. Scan the QR code with your Whatsapp Mobile App (Go to settings > Linked device > Scan & Connect).
|
||||
4. Done - Whatsapp Connected.
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
<input type="text" id="node-input-whatsappLink" placeholder="Name">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-gID"><i class="fa fa-address-card-o"></i> Number</label>
|
||||
<label for="node-input-gID"><i class="fa fa-address-card-o"></i> Group ID </label>
|
||||
<input type="text" id="node-input-gID" placeholder="Group Chat ID..">
|
||||
</div>
|
||||
<div class="form-tips">
|
||||
|
||||
@ -1,14 +1,20 @@
|
||||
module.exports = function(RED) {
|
||||
const { Client, LocalAuth } = require('whatsapp-web.js');
|
||||
const QRCode = require('qrcode');
|
||||
const OS = require('os');
|
||||
const Path = require('path');
|
||||
|
||||
let userDir = OS.homedir();
|
||||
let whatsappLinkDir = Path.join(userDir, '.node-red', 'Whatsapp-Link');
|
||||
function RemoteClientNode(n) {
|
||||
RED.nodes.createNode(this,n);
|
||||
let WAnode = this;
|
||||
let whatsappConnectionStatus;
|
||||
|
||||
const client = new Client({
|
||||
authStrategy : new LocalAuth(),
|
||||
authStrategy : new LocalAuth({
|
||||
dataPath : whatsappLinkDir
|
||||
}),
|
||||
puppeteer : {headless : true }
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user