There is a serious issue of design in whatsapp that has been highlighted in a perfect way by “The Disinformatics” based on an article by Vice.com. This problem potentially allows anyone to know when you are online and who you are communicating with even if you explicitly chose to hide this information in the settings. In fact there are various applications, sites and services (for a fee) that allow to check if a user is online knowing only the phone number that completely bypasses the setting chosen by the user in whatsapp.
Moreover, you may know how much time a user has stayed online for each chat session and you can receive notifications when a designated person opens whatsapp and turns out online. In technical terms all this is cyberstalking yet it is an integrated function in whatsapp. It is not a bug but it is part of the system with which it was designed whatsapp.
Basically, if the user opens whatsapp and then turns out “online” and then after a few seconds the user b passes to a “online” state probably the first sent a message to the second. Are many software that allow you to carry out several checks on accounts, obtaining information that you should not have. Telegram instead allows to effectively hide the state and the last connection with a approximate wording like “new online or online within a week or a month” and does not allow any tool to get the precise data of connection of users.