chat-linker
                                
                                
                                
                                    chat-linker copied to clipboard
                            
                            
                            
                        the bridge between jabber and telegram over chat-bots
chat-linker 
It makes a bridge between different IM-networks via chat-bot
Usage
Clone or download files
$ git clone https://github.com/jt3k/chat-linker.git
or
$ curl https://codeload.github.com/jt3k/chat-linker/zip/master | tar -xf- -C /path/to/save
Setting
Copy 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" } 
Build
$ npm run build
Run
To start the bot:
- Use the commands 
npm run prodfor production settings ornpm run devfor development. 
Contribution
Tests
To run tests use following command:
$ npm test
Setting up husky
If after the installation does not work git-hooks then run the following command in project directory.
$ node ./node_modules/husky/bin/install.js
Discussion
- dev-chat: @chat_linker (RU)
 
FAQ
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.
 
License
MIT © Andrey Gurtovoy