Describe the bug
I am trying to forward a media message(pdf document) to multiple users, my app broadcasts messages in batch of 5 and waits for 4 seconds. I noticed that forward message doesn't go to every user. I have to send it manually. Any idea what could be wrong? I know WA has a limit of 5 people per share.
Steps to Reproduce
Steps to reproduce the behavior:
forwardMessages api to send to one person. Put that in queue of 5 each per dispatch and the message forwards to only few people randomly.create() code
This is the code you use to create the client. e.g
client = await sulla.create(SESSION_NAME, { headless: true, autoRefresh: false, qrRefreshS: 30});
// sample of MessageId = '[email protected]_3ACBAE76A3BFA56659B6'
this.client.forwardMessages(to, messageId, false);
Expected behavior
Message should be forwarded to every user without fail? I guess?
DEBUG INFO
This is the info printed to the console when you start your app. It should look like this
Debug Info {
WA_VERSION: 2.2013.7,
PAGE_UA: 'WhatsApp/0.4.613 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36',
WA_AUTOMATE_VERSION: 1.8.70,
BROWSER_VERSION: HeadlessChrome/81.0.4044.0
}
I appreciate the time and hardwork you put in. Thank you in advance my friend!
I dont think this is a bug, due to the pandemic, whatsapp has limited the number of contacts you can forward messages to in order to help check fake news from spreading. Check
@alishahlakhani I agree with @mcroni best thing to do is to send everyone a link to a document for now. You can blame people spreading fake news about 5G and sharing David Icke garbage for this issue.
@alishahlakhani Alternatively, you can send the files individually to each user. Should serve the same purpose and be just as productive as IIRC the file would be cached. Another option would be to forward a message but without the 'forward' part if that makes sense. It's entirely possible to make a sort of ghostForward method where the file gets sent as you, without the 'forwarded' but none of the overhead of uploading it to each contact.
@smashah @mcroni Thanks for the update above.
@smashah I actually tried that before but the problem is the file that we're sending using the system is each around 2-10MB. and it takes long time for the system to send file to individual users. Also I'll have to download and store the file on my server and upload it again right? Do I understand it correctly?
Upload it to WeTransfer, get the link then forward the link for now @alishahlakhani
Yeah I guess the safest option is to upload a link and share that too.
I've also managed to work around the problem for now. Turns out if I send 4 messages instead of 5 in batches. it seems to be working just fine. I guess for now I can settle for this solution until all this Fake news problem is solved.
Thanks for the help. I am closing this issue for now.
@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`);
//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`);
})();
@alishahlakhani Try ghostForward.
//'forwards' single message to a chat
client.ghostForward('[email protected]',"[email protected]_831D93B11B0C03201138F6CFC2744FA8"