open-wa / wa-automate-nodejs

💬 🤖 The most reliable tool for chatbots with advanced features. Be sure to 🌟 this repository for updates!
https://docs.openwa.dev/
Other
3.14k stars 600 forks source link

setGroupIconByUrl not working #345

Closed roysG closed 4 years ago

roysG commented 4 years ago

I checked, i got error: "Failed to update group icon,Please try again later"

code: await client.setGroupIconByUrl('972559661703-1587456110@g.us', 'https://res.cloudinary.com/picktags-com/image/upload/v1587297034/unnamed_3_vbkodw.png');

i also tried:

await client.setGroupIconByUrl('972559661703_1587456110@g.us', 'https://res.cloudinary.com/picktags-com/image/upload/v1587297034/unnamed_3_vbkodw.png');

smashah commented 4 years ago

WhatsApp does not accept pngs. Use a jpeg. @roysG

smashah commented 4 years ago

Also, the icon has to be very small otherwise it won't work.

roysG commented 4 years ago

I also tried now with this image:

https://res.cloudinary.com/picktags-com/image/upload/v1587464241/icon2_gdstwh.jpg

Still not working

On Tue, Apr 21, 2020 at 12:36 PM Mohammed Shah notifications@github.com wrote:

Also, the icon has to be very small otherwise it won't work.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/open-wa/wa-automate-nodejs/issues/345#issuecomment-617069429, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXZDOTGWXPEKL6BPTISZDTRNVSLBANCNFSM4MNDHWBA .

smashah commented 4 years ago

@github-actions run

âš¡ Release! âš¡ ```js (async () => { function exec(cmd) { console.log(execSync(cmd).toString()); } // Config const gitUserEmail = "github-actions[bot]@users.noreply.github.com"; const gitUserName = "github-actions[bot]"; exec(`echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc`); exec(`git config --global user.email "${gitUserEmail}"`); exec(`git config --global user.name "${gitUserName}"`); exec(`npm i`); exec(`npm run release-ci`); //comment on the issue var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString(); await postComment(result); //create changelog image exec(`npm run release-image`); exec(`git commit -a -m 'updated release-image'`); exec(`git push --force`); })(); ```
smashah commented 4 years ago

Changelog

🚀 Release 1.8.74 (2020-04-21)

smashah commented 4 years ago

@roysG In the latest version 1.8.74, it now converts the image on to the correct size and format so your pngs and large jpegs should work now as long as sharp works on your system.

Tested to be working:


//large jpeg
 await client.setGroupIconByUrl("447777777777-1579189596@g.us", "https://upload.wikimedia.org/wikipedia/commons/1/16/HDRI_Sample_Scene_Balls_%28JPEG-HDR%29.jpg");

//and with png
 await client.setGroupIconByUrl("447777777777-1579189596@g.us", "https://res.cloudinary.com/picktags-com/image/upload/v1587297034/unnamed_3_vbkodw.png'");

Let me know if this worked for you. Thanks

roysG commented 4 years ago

AWSOME!, Is there any option to get the chat but also to simulate it as i clicked it in ui?

smashah commented 4 years ago

@roysG there are no plans for a UI layer on this repo.