Merge pull request #25 from odv1983/main
Corrections to send image and create new chromium profiles
This commit is contained in:
commit
a8d39d598e
33
.github/workflows/npm-publish.yml
vendored
Normal file
33
.github/workflows/npm-publish.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
||||||
|
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
||||||
|
|
||||||
|
name: Node.js Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm test
|
||||||
|
|
||||||
|
publish-npm:
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
registry-url: https://registry.npmjs.org/
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm publish
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
||||||
@ -162,6 +162,7 @@ Issues and Suggestions are welcome [here.](https://github.com/raweee/node-red-co
|
|||||||
* `Ver-0.1.33` : Button and list support added, Minnor bugs fixed.
|
* `Ver-0.1.33` : Button and list support added, Minnor bugs fixed.
|
||||||
* `Ver-0.1.34` : Multiple Events reading options are added in Chats-In Node.
|
* `Ver-0.1.34` : Multiple Events reading options are added in Chats-In Node.
|
||||||
* `Ver-0.1.36` : Check box added to show status as `Online/Offline` in Whatsapp-Link Node, to get push notifications. Ping-Interval added to keep whatsapp alive for long time. Multiple examples added.
|
* `Ver-0.1.36` : Check box added to show status as `Online/Offline` in Whatsapp-Link Node, to get push notifications. Ping-Interval added to keep whatsapp alive for long time. Multiple examples added.
|
||||||
|
* `Ver-0.1.37` : Changes for correction of send message with images and use Chromium profiles in Puppeteer.
|
||||||
|
|
||||||
## Future Nodes
|
## Future Nodes
|
||||||
Currently working on more Whatsapp Node and will be avilable soon -
|
Currently working on more Whatsapp Node and will be avilable soon -
|
||||||
|
|||||||
@ -77,7 +77,7 @@ module.exports = function(RED) {
|
|||||||
var whatsappImageBase64 = whatsappImage.split(',')[1] || whatsappImage;
|
var whatsappImageBase64 = whatsappImage.split(',')[1] || whatsappImage;
|
||||||
try {
|
try {
|
||||||
if (node.waClient.clientType === "waWebClient"){
|
if (node.waClient.clientType === "waWebClient"){
|
||||||
numb = await webNubmerSeteing(node.number)
|
numb = await webNubmerSeteing(numb)
|
||||||
var myMessage = new MessageMedia('image/png', whatsappImageBase64, null, null);
|
var myMessage = new MessageMedia('image/png', whatsappImageBase64, null, null);
|
||||||
node.waClient.sendMessage(numb, myMessage, {caption : whatsappCaption || "Image from Node-Red"});
|
node.waClient.sendMessage(numb, myMessage, {caption : whatsappCaption || "Image from Node-Red"});
|
||||||
}
|
}
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red-contrib-whatsapp-link",
|
"name": "node-red-contrib-whatsapp-link",
|
||||||
"version": "0.1.32-A",
|
"version": "0.1.37-A",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "node-red-contrib-whatsapp-link",
|
"name": "node-red-contrib-whatsapp-link",
|
||||||
"version": "0.1.32-A",
|
"version": "0.1.37-A",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@adiwajshing/baileys": "latest",
|
"@adiwajshing/baileys": "latest",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red-contrib-whatsapp-link",
|
"name": "node-red-contrib-whatsapp-link",
|
||||||
"version": "0.1.36A",
|
"version": "0.1.37-A",
|
||||||
"description": "Node to send and receive whatsapp messages in groups and chats. | No third party APIs",
|
"description": "Node to send and receive whatsapp messages in groups and chats. | No third party APIs",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@ -29,7 +29,7 @@ module.exports = function(RED) {
|
|||||||
}),
|
}),
|
||||||
puppeteer : {
|
puppeteer : {
|
||||||
headless : true,
|
headless : true,
|
||||||
args : ['--no-sandbox', '--disable-setuid-sandbox']
|
args : ['--no-sandbox', '--disable-setuid-sandbox', '--user-data-dir=' + node.id]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -263,4 +263,4 @@ Participants : ${chat.groupMetadata.size}`
|
|||||||
|
|
||||||
}
|
}
|
||||||
RED.nodes.registerType("whatsappLink",RemoteClientNode);
|
RED.nodes.registerType("whatsappLink",RemoteClientNode);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user