mukulhase / WebWhatsapp-Wrapper

An API for sending and receiving messages over web.whatsapp [Working as of 18th May 2018]
https://webwhatsapi.readthedocs.io/en/latest/
MIT License
2.04k stars 795 forks source link

is_logged_in #258

Open UmairAnjum opened 6 years ago

UmairAnjum commented 6 years ago

Hello diver.is_logged_in() is not working as expected. Even I am logged in it shows I am not logged in Thnaks

eliasaj92 commented 6 years ago

It's working for me. I am using the firefox client

UmairAnjum commented 6 years ago

Hello It works perfectly for English language but when I change it to Portuguese, even I am logged in in it shows me that I am not logged in Thanks

lfdelphino commented 6 years ago

I've tried with other languages and it works normally here. Doesn't window.Store.Contact exist in portuguese?

Source:

window.WAPI.isLoggedIn = function (done) {
    // Contact always exists when logged in
    const isLogged = window.Store.Contact && window.Store.Contact.checksum !== undefined;

    if (done !== undefined) done(isLogged);
    return isLogged;
};