It is possible that they knew your location because of a failure of Telegram for computers. Now it is solved. This is how this vulnerability was discovered
Do not fear, the problem has been corrected and Telegram continues to maintain its title of the safest and most private courier service. But it is worth remembering that every Internet tool has vulnerabilities and dangers , however much its fame precedes it. In this case, the Telegram application for computers exposed the IP address of its users. Right at a specific moment in the conversation. Only for a moment. But it was dangerous enough to reveal the possible location of those who use this tool to chat.
The problem has been discovered by Dhiraj Mishra, a security researcher. In his experience, Mishra has verified that the Telegram desktop application shares the user’s public and private IP during voice calls . This is due to the impossibility of deactivating user-to-user technology, as it does in the mobile version. This framework causes this information to be transferred from the IP, allowing others to know the location of the users or the address of their computers.
Luckily, this problem only occurs in the Telegram application for computers. And is that in mobile versions there is the option to disable this technology P2P or peer-to-peer (user to user). When deactivated, this information is not sent. In the case of the desktop application, the problem appeared at the time of initiating a voice call, with which the information of the IP address is sent.
However, as we say, Telegram is aware of the problem and has already put a solution. In fact, beta version 1.3.17 and final version 1.4 already have options to disable this P2P system in the settings. Of course, and as dictated by the vulnerability policy of Telegram, the company has also rewarded investigator Dhiraj Mishra for finding the failure with 2,000 euros ($2,300).
It is clear, then, that Telegram is safe, as much or more as WhatsApp thanks to the possibility of choosing many of the privacy aspects of the conversations. But nothing is infallible today. Of course, the system of detection and solution of failures, as well as the rewards that are related in the Telegram program, work really well.