It makes a bridge between different IM-networks via chat-bot
$ git clone https://github.com/jt3k/chat-linker.gitor
$ curl https://codeload.github.com/jt3k/chat-linker/zip/master | tar -xf- -C /path/to/saveCopy sample-config.json to app-config.json and tune it up.
To determine Telegram room parameters, follow the procedure:
-
Create a bot according to Telegram documentation
-
It's essential to disable Privacy mode to make the bot to observe all messages in the room
-
Manually add a bot to the room (using Telegram's invite functionality)
-
Send a message to the bot directly, e.g.
/my_id @bot_user_id -
Visit
https://api.telegram.org/bot<bot_api_key>/getUpdatesand extract"chat"object from there. E.g.{ "id": -1001054401089, "title": "bimo_test", "type": "supergroup" }
$ npm run buildTo start the bot:
- Use the commands
npm run prodfor production settings ornpm run devfor development.
To run tests use following command:
$ npm test
If after the installation does not work git-hooks then run the following command in project directory.
$ node ./node_modules/husky/bin/install.js- dev-chat: @chat_linker (RU)
Does it support bridging more than one room with a single bot?
- No, it's not yet supported
What types of Telegram groups are supported?
- The bot supports ordinary groups as well as supergroups.
The bridge only works XMPP -> Telegram, not Telegram -> XMPP.
- Check the bot privacy settings, then remove the bot from the Telegram chat, and invite it again.
I can't find any id from my room when I go to https://api.telegram.org/bot<bot_api_key>/getUpdates
- Sometimes the reply to this request is empty, keep on trying.
MIT © Andrey Gurtovoy