Wa-automate-nodejs: Feature request: archive/unarchive chats

Created on 10 Apr 2020  Â·  7Comments  Â·  Source: open-wa/wa-automate-nodejs

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

enhancement good first issue

Most helpful comment

This works perfectly! Thanks a lot man. Very much appreciated. Will close this issue

All 7 comments

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);
  })();

Changelog

🚀 Release 1.8.46 (2020-04-10)

  • Release 1.8.46 36b32f6
  • implemented archive + unarchive chat #295 e1bda2c

@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

Was this page helpful?
0 / 5 - 0 ratings