Wa-automate-nodejs: publishing status

Created on 8 Apr 2020  Â·  13Comments  Â·  Source: open-wa/wa-automate-nodejs

Feature request
I tried to send status

this code helps to get all broadcasts and user status among them

const contacts = await client.getAllContacts();
for (const contact of contacts) {
    if (contact.id.server === 'broadcast' && contact.id._serialized !== 'status@broadcast') {
        console.log(contact)
    }
}

which mean status@broadcast is also broadcast

when sending message to broadcast evrything works just greate: text, media, location etc.

we need to add ability for 'status@broadcast' as:
await client.sendText("status@broadcast", "test");
and figure out how to do that.
let me help invastigate it if you need some help

i assume we need to select background color for text status, limit video length for 15 seconds etc.
i dont see any option to do that by whatsapp web write now

PRIORITY Requires Investigation enhancement

All 13 comments

@itzharDev is this referring to the same status in #293 (like a Snapchat story)?

Yes. That's the story I'm talking about

From my investigation, I've found some status specific attributes for text statuses:

font: '1' (1/2/3/4 etc. represent different fonts)
textColor: 4294967295 (some random number - need to find the function that converts rgb to this special whatsapp number) 
backgroundColor: 4294937228 (same)
__x_statusV3TextBg: "rgba(193, 160, 63, 255)"

great. let me know where it is ill try to figure it out

@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.52 (2020-04-11)

@itzharDev Almost gave up on this one.

  const statusResult = await client.postStatus('test!!!!');
  console.log(statusResult);
  // { status: 200, t: 1586626288 }  

This feature is behind a paywall currently and will be GA on May 1, 2020. Please read the docs for more info.

https://open-wa.github.io/wa-automate-nodejs/classes/whatsapp.html#poststatus

Works perfectly

TODO:

  • getMyStatusArray() //return all current status objects
  • deleteStatus(id) //delete a status
  • deleteAllStatus() //clear out my story, remove all statuses

@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.53 (2020-04-12)

  • Release 1.8.53 22a6dc8
  • getMyStatusArray + deleteAllStatus + deleteStatus #290 b37ed76

Closing for now as the initial issue is now resolved. If there are more problems please make a new issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jersonjunior picture jersonjunior  Â·  6Comments

DeLuca92 picture DeLuca92  Â·  5Comments

mrbarnk picture mrbarnk  Â·  5Comments

renato-macedo picture renato-macedo  Â·  6Comments

sandro-salles picture sandro-salles  Â·  4Comments