Socket
Socket
Sign inDemoInstall

node-red-contrib-whatsapp-link

Package Overview
Dependencies
324
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.39-A to 0.1.39-B

examples/ImageMessage.json

2

admin.js

@@ -75,3 +75,3 @@ module.exports = function(RED) {

node.send(msg);
notification.reply('!Node-Red joined');
// notification.reply('!Node-Red joined');
});

@@ -78,0 +78,0 @@

@@ -8,3 +8,4 @@ module.exports = function(RED) {

node.waClient = whatsappLinkNode.client;
const { MessageMedia, Buttons } = require('whatsapp-web.js')
const { MessageMedia, Buttons } = require('whatsapp-web.js');
const {Mimetype} = require(`@whiskeysockets/baileys`);

@@ -79,2 +80,3 @@ let SetStatus = function(WAStatus, color){

var whatsappImageBase64 = whatsappImage.split(',')[1] || whatsappImage;
console.log(whatsappImageBase64)
try {

@@ -88,8 +90,10 @@ if (node.waClient.clientType === "waWebClient"){

numb = await socNubmerSeteing(numb)
const imageMessage = {
text: whatsappCaption,
footer: null,
templateButtons: null,
image: {url : whatsappImage }
};
let imageToSend = Buffer.from(whatsappImageBase64, "base64");
const imageMessage = {
// image: {url : whatsappImage},
image: imageToSend,
caption: whatsappCaption
}
let client = await node.waClient;

@@ -96,0 +100,0 @@ const msgStatus = await client.sendMessage(numb, imageMessage);

@@ -79,6 +79,6 @@ module.exports = function(RED) {

async function whatsappMultiMediaMessage(numb, whatsappImage, whatsappCaption){
var whatsappImageBase64 = whatsappImage.split(',')[1] || whatsappImage;
try {
if (node.waClient.clientType === "waWebClient"){
numb = await webNubmerSeteing(node.number)
var whatsappImageBase64 = whatsappImage.split(',')[1] || whatsappImage;
var myMessage = new MessageMedia('image/png', whatsappImageBase64, null, null);

@@ -88,9 +88,11 @@ node.waClient.sendMessage(numb, myMessage, {caption : whatsappCaption || "Image from Node-Red"});

else {
numb = await socNubmerSeteing(node.number)
const imageMessage = {
text: whatsappCaption,
footer: null,
templateButtons: null,
image: {url : whatsappImage }
};
numb = await socNubmerSeteing(node.number);
let imageToSend = Buffer.from(whatsappImageBase64, "base64");
const imageMessage = {
// image: {url : whatsappImage},
image: imageToSend,
caption: whatsappCaption
}
let client = await node.waClient;

@@ -97,0 +99,0 @@ const msgStatus = await client.sendMessage(numb, imageMessage);

{
"name": "node-red-contrib-whatsapp-link",
"version": "0.1.39A",
"version": "0.1.39B",
"description": "Node to send and receive whatsapp messages in groups and chats. | No third party APIs",

@@ -36,3 +36,3 @@ "repository": {

"qrcode": "^1.5.1",
"whatsapp-web.js": "~1.22.2-alpha.1"
"whatsapp-web.js": "^1.22.2-alpha.1"
},

@@ -39,0 +39,0 @@ "engines": {

# Whatsapp Link :iphone:
Simple node for connecting Node-Red to Whatsapp :iphone:
Send and Receive Whatsapp Image/Text.

@@ -68,3 +69,3 @@ Currently in developing mode, Continous updated may encounter. :sweat_smile:

3. **Chats / Group Out** : As simple as mention on name, node will send `msg.payload` recived at input to the number mentioned in node.
`A-reply-to-All.json` example is avilable in examples to import.
`ImageMessage.json` example is avilable in examples to import.

@@ -74,3 +75,3 @@ MultiMedia Message: Requirments-

|--------|-------------|
| `msg.image` | Base64 (encoded image) |
| `msg.image` | Base64 (encoded image), [`image-tool`](https://flows.nodered.org/node/node-red-contrib-image-tools) node work fine|
| `msg.payload` | Image Caption |

@@ -149,2 +150,3 @@ | `msg.toNumber` | Reciver number (if number not provided in node) |

`A-reply-to-All.json` example is avilable in examples to import.

@@ -169,3 +171,3 @@ 5. **Reply Node** : In Beta mode. (Chats-out Node can be used instead of reply node)

* `Ver-0.1.37` : Changes for correction of send message with images and use Chromium profiles in Puppeteer.
* `Ver-0.1.39A` : Broken "Whatsapp-Web & Lite" fixed. Able to recive and send text. working on easy to use nodes.
* `Ver-0.1.39B` : Broken "Whatsapp-Web & Lite" fixed. Able to `Send/Receive` whatsapp `Image/Text` in both Whatsapp-Lite & Web. working on easy to use nodes.

@@ -172,0 +174,0 @@ ## Future Nodes

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc