Page 2 of 8

Re: [DEV] Whatsapp Notifier

Posted: Fri Jun 12, 2015 11:17 pm
by Volksdevil
This sounds interesting, but I don't understand all the password/phone number stuff. Is it to set a phone number that all notifications come from?

Re: [DEV] Whatsapp Notifier

Posted: Fri Jun 12, 2015 11:35 pm
by tas2580
Whatsapp is based on XMPP protocol, so you need a username and a password. Normally you have a phone to use Whatsapp, so your phone number is your user name and the password is generated in the background (you receive a SMS on first start). Every time you install Whatsapp on a new phone a new password will be generated.
Here we have no phone so we must fake a little bit to get a valid login.

The login data is used for a Whatsapp account that sends the messages to the users. You can use every phone number on that you can receive SMS or phone calls. That means you can also use a public phone box (in germany you can call phone boxes, I don't know how it is in other countries). You can also use the phone number that I gave in the first post, but than some one can change the avatar or status so it might be better to use your own phone number.

Re: [DEV] Whatsapp Notifier

Posted: Sat Jun 13, 2015 1:15 am
by Volksdevil
OK cool, thanks for the explanation.

Where is this typed though? In the extension somewhere?
To install yowsup type:

apt-get install python-dateutil
wget https://github.com/tgalal/yowsup/archive/master.zip
unzip master.zip
cd yowsup-master/
nano config.cfg
After that enter: (Replace 49 with your country code)

cc=49
phone=49{PHONE NUMBER} (without 0 at the beginning)
id=
password=
Then save the file and go back to console and type python yowsup-cli registration -c config.cfg -r sms Now you should get a SMS with a code, type: python yowsup-cli registration -c config.cfg -R {YOUR CODE WITHOUT -}

Re: [DEV] Whatsapp Notifier

Posted: Sat Jun 13, 2015 1:25 am
by tas2580
No, this are Linux (Debian/Ubuntu) commands, if you use Windows you can use WART to get the password. Or send me a PM with your phone number and I can order the SMS for you.

Re: [DEV] Whatsapp Notifier

Posted: Sat Jun 13, 2015 2:13 am
by Volksdevil
Yeah that would be cool thanks. Just that I don't like installing things on my PC. I'll get a SIM card sorted first :)

While I'm here...If I buy a pay as you go SIM, once activated or whatever, everything will still work once I remove the SIM? Sorry for the simple questions.

Re: [DEV] Whatsapp Notifier

Posted: Sat Jun 13, 2015 2:37 am
by tas2580
After activating you can remove the SIM card.

You need it only one time to receive the SMS with the code. If you have a phone number that can't receive SMS I can also trigger a phone call. So if you can't get a SIM card for free and if you don't want to spend money search for a public phone box and search its phone number. Look for a small sign with its number on it or just call you self from it and look at the number in your display.
If you use a public phone box you need to hope that you are the only freak that register the phone box for whatsapp :ugeek:

If you have a number write me a PM with it, preferably write me a PM first to check that I'm online and have some time.

Re: [DEV] Whatsapp Notifier

Posted: Sat Jun 13, 2015 6:01 am
by Alex Grigoras
Hello !

I receive the notification via Whatsapp but, it is possible to have the link clickable inside from the notification ?

Re: [DEV] Whatsapp Notifier

Posted: Sat Jun 13, 2015 6:22 am
by Alex Grigoras
Another situation,

It send me the notification whithout the title of my forum. It gives me only the brackets with no content inside: " "

Re: [DEV] Whatsapp Notifier

Posted: Sat Jun 13, 2015 1:50 pm
by hospitaal
tas2580 wrote:But I know setting the avatar doesn't work at the moment, wait für the next update.
I would also like the settings-feature to work! Is there any other way I can change the name and avatar of the whatsapp-account in the meantime?

Great extension by the way!

Re: [DEV] Whatsapp Notifier

Posted: Sun Jun 14, 2015 7:13 pm
by Volksdevil
I echo the above, but I'm sure you will get that working. I tested with the details you provided and it seems to work awesome!

PS: I have the number of a public phone box to try 8-)
tas2580 wrote:Or send me a PM with your phone number and I can order the SMS for you.

Re: [DEV] Whatsapp Notifier

Posted: Sun Jun 14, 2015 9:10 pm
by tas2580
Alex Grigoras wrote:I receive the notification via Whatsapp but, it is possible to have the link clickable inside from the notification ?
On my phone it's clickable. I can't change anything in the messages because I just use the E-Mail template so it works on all notifications, also on notifications that came with other extensions.
Alex Grigoras wrote:It send me the notification whithout the title of my forum. It gives me only the brackets with no content inside: " "
OK, that seems to be a bug, I have the same problem. I will check this.
hospitaal wrote:I would also like the settings-feature to work! Is there any other way I can change the name and avatar of the whatsapp-account in the meantime?
I'am on it. The problem with the status message was a bug in Chat-API that I have fixed now. The problem with the image is a problem in my extension that I will fix with the next version. Just wait, the next version will be ready in the next hours.

Re: [DEV] Whatsapp Notifier

Posted: Mon Jun 15, 2015 1:22 am
by tas2580
Update to 0.1.2, all known bugs are fixed and as a new feature users can select there country code with a dropdown, I think that makes it more easy for your users to enter there phone number in the right format.

If you use the english language file you need to translate the country names I spend about 4 hours today to search all country codes and entered them to the code of this extension, so today its to late for me to translate that all into english. Maybe I will do that tomorrow until it's not translated feel free to do that and send a pull request ;)

Re: [DEV] Whatsapp Notifier

Posted: Mon Jun 15, 2015 2:31 am
by Volksdevil
Hi Tas,

Just a quick one. I'm currently on the older version just before this update... Upon administering a user (Editing their profile in ACP) I noticed that my own phone number is showing in the whatsapp field. Is this normal?

I checked another user, and my phone number is in theirs too.

Re: [DEV] Whatsapp Notifier

Posted: Mon Jun 15, 2015 2:40 am
by tas2580
No that's not normal, but I have found the problem and will fix it as soon as possible, thanks for reporting.

Re: [DEV] Whatsapp Notifier

Posted: Mon Jun 15, 2015 2:43 am
by Volksdevil
No worries.

I just used my test account.

Added a random phone number.
Submitted.

Viewed in ACP with my noral admin account - My own phone number showed instead.

Submitted.

Now the user has my phone number in their profile.