Hi Guys,
I have to admit this is the most comprehensive and structured solution ive seen written for nodejs for WA. I have been using checking out WAPI.js for python and was looking for a nodejs version and landed here. Great work!
Is the archive/unarchive feature on the roadmap? I have a long load time at startup from archived conversations on the device and want to programatically unarchive then delete when necessary
Good idea!
@github-actions run
âš¡ Release! âš¡
(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`);
var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString();
await postComment(result);
})();
@blackchineykh try it out and report back if it works for you. Thanks
//archive chat
await client.archiveChat('[email protected]',true);
//unarchive chat
await client.archiveChat('[email protected]',false);
Great. Will test it out and report back
Great. Please note that if returns false it just means that the chat is already in that state.
//If chat is already archived, running:
const archiveJob = await client.archiveChat('[email protected]',true)
//will result in archiveJob = false
This works perfectly! Thanks a lot man. Very much appreciated. Will close this issue
Most helpful comment
This works perfectly! Thanks a lot man. Very much appreciated. Will close this issue