Telegram Nearby Map uses OpenStreetMap and the official Telegram library to find the position of nearby users.
Inspired by Ahmed's blog post and a Hacker News discussion. Developed by github.com/tejado.
Every 25 seconds all nearby users will be received with TDLib from Telegram. This includes the distance of every nearby user to "my" location. With three distances from three different points, it is possible to calculate the position of the nearby user.
This only finds Telegram users which have activated the nearby feature. Per default it is deactivated.
Requirements: node.js and an Telegram account
- Create an API key for your Telegram account here
- Download the repository
- Create config.js (see config.example.js) and put your Telegram API credentials in it
- Install all dependencies: npm install
- Start the app: npm start
- Look carefully at the output: you will need to confirm your Telegram login
- Go to http://localhost:3000 and have fun
Requirements: docker and docker-compose installed (in new version of docker-cli it's built in syntax instead of docker-compose
just docker compose
)
To make session and data presistent I created two mount points for TDlib files. First as cold run start with downloading this repo
-
Copy docker.sample.env to .env and edit file to add your telegram bot id and hash
-
First as a cold run to establish session run
docker-compose run telegram-map
and type in your phone number added to telegram account and then type in your confirmation code, then just exit session with Ctrl+CIf you want to have presistent directories somewhere else go into that directory and run
docker-compose -f /full/path/to/docker-compose.yml run telegram-map
-
From now we can start our service with
docker-compose up -d
ordocker-compose -f /full/path/to/docker-compose.yml up -d
-
Enjoy
To avoid that you have to build TDLib yourself (https://github.com/tdlib/td#building), I added tdlib.native in the lib/tdlib folder. Please note that this is an external dependency that has not been fully reviewed by me!
- Added tdlib.native for Linux (now it works in GitHub Codespaces)
- Updated all dependencies
- Bugfixes