From e0bb5ea69de3acb71f9f5f7916329f2a69db329c Mon Sep 17 00:00:00 2001 From: rawee Date: Thu, 8 Dec 2022 21:22:24 +0530 Subject: [PATCH] Node tips added --- whatsapp-out.html | 6 ++++-- whatsapp-out.js | 4 +++- whatsappLink.html | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/whatsapp-out.html b/whatsapp-out.html index 1d499fe..3935c0a 100644 --- a/whatsapp-out.html +++ b/whatsapp-out.html @@ -30,8 +30,10 @@ -

Don't forget to mention international dialing code befor your number. - Number must be in format like `+11 99999 99999` without any space

+
+

Don't forget to mention international dialing code befor your number. + Number must be in format like +11 99999 99999 without any space

+
diff --git a/whatsapp-out.js b/whatsapp-out.js index 10efbb3..f14a451 100644 --- a/whatsapp-out.js +++ b/whatsapp-out.js @@ -3,7 +3,9 @@ module.exports = function(RED) { RED.nodes.createNode(this,config); var node = this; node.number = config.number; - node.number = this.number.includes('@c.us') ? this.number : `${this.number}@c.us`; + node.number = node.number.match(/\d+/); + //node.number = this.number.includes('@c.us') ? this.number : `${this.number}@c.us`; + node.number = `${node.number}@c.us`; var whatsappLinkNode = RED.nodes.getNode(config.whatsappLink); node.waClient = whatsappLinkNode.client; diff --git a/whatsappLink.html b/whatsappLink.html index 23a527a..0a587cc 100644 --- a/whatsappLink.html +++ b/whatsappLink.html @@ -16,8 +16,8 @@ -
-

Thats sit. you don't have to change any thing here just click the ok - button and proceed. Name can be update if required but with no-space.

+
+

Thats sit. you don't have to change any thing here just click the ok + button and proceed. Name can be update if required but with no-space.

\ No newline at end of file