Closed xandao-dev closed 4 years ago
I would like to work on this. I just got a reference that how to send message through api.whatsapp.com, here's a link of it : https://www.androidpit.com/send-whatsapp-message-without-adding-contact-to-address-book . Can i implement it here? Or please suggest some better ways.
@zulkernine I'm refactoring the project and I already included this feature to send message to unknown number. I will release it soon. So wait for my release to start working on this issue.
Ok. I'm waiting ☺️
@zulkernine ready
What is the type of the file ? In which format will it contains those numbers??
a simple txt, 1 number per line:
9194848948 4848946548 4684848648
Alright
Should I use that api to send message to unsaved number? In that case , whatsapp web will be opened in the new tab again, thus it would take a very long time. So what should I do??
use this method: search_and_select_target. It will detect the number and load the page, without opening a new one
so you can put it in a for loop:
for number in numbers:
search_and_select_target(page, number)
send message
I got the idea :) I'm starting to implement it . I'll make the commit soon.
Searching the target(through number) more than once gives this pop up. How to disable this pop up ?
If this check box is checked ( which comes during second target search) , then it doesn't any more.
My code is ready for commit except this issue(Mentioned upper).
a simple txt, 1 number per line:
9194848948 4848946548 4684848648
Should I assume all the numbers are correct and has a whatsapp account? Number will contain country code or not?
I implemented it in such a way that if country code is provided then alright otherwise indian country code is used.
skip the number if error and log a message.
skip the number if error and log a message.
Following error is skipped in the try_load_contact_by_number() in target search. Consequently, Though the number is invalid, this function is returning true leading to exit call in get_focused_target_title(). :(
Think that all numbers are valid, I will fix this in the weekend.
Ok
A PR is created regarding this issue . Please review.
What happened? What about that PR?
Load a file with phone numbers and send a message to all of them! The difference between this and the Whatsapp broadcast in smartphone is that we can send message even if we don't have that contact!