Closed smashah closed 4 years ago
#663
#656
#657
#660
getStickerDecryptable
to decrypt stickers correctly #580 031317f
202be5f
You are now able to decrypt sticker's (including animated stickers):
let mediaData;
if( message.type==='sticker') {
let stickerDecryptable = await client.getStickerDecryptable(message.id);
mediaData = await decryptMedia(stickerDecryptable);
} else {
mediaData = await decryptMedia(message);
}
fs.writeFile(filename, mediaData, function(err) {
if (err) {
return console.log(err);
}
console.log('The file was saved!');
});
Note: This is an Insider's feature for now and requires a license key.
https://open-wa.github.io/wa-automate-nodejs/classes/client.html#getstickerdecryptable
can you explain in more detail what this does?
@MarsVard Without this, the decrypt method will result in a transparent empty webp
file as that is the background of the sticker.
With getStickerDecryptable
, the actual sticker message is retrieved which will allow the decrypt function to output the sticker (including an animated sticker).
@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`); })(); ```