Matrix<->Telegram user-puppeting portal
  • JavaScript 98.5%
  • Perl 1.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jason Robinson 1543101006
Merge pull request #15 from Valodim/patch-1
Put "on hold" notice into readme
2019-05-09 17:52:51 +03:00
config Configuration to require admin console commands to start with ! 2017-01-19 12:55:21 +00:00
lib fix licensing & copyright 2018-01-24 11:02:10 +01:00
.gitignore Initial .gitignore 2017-01-05 20:21:50 +00:00
hash-password.pl fix licensing & copyright 2018-01-24 11:00:32 +01:00
index.js fix licensing & copyright 2018-01-24 11:00:32 +01:00
LICENSE fix licensing & copyright 2018-01-24 11:00:32 +01:00
package.json fix licensing & copyright 2018-01-24 11:00:32 +01:00
README.md Put "on hold" notice into readme 2019-05-09 16:10:05 +02:00

THIS PROJECT IS ON HOLD

This project is not actively developed, maintained or supported at the moment. It is not recommended for production use.

For a working Telegram bridge, please check out https://github.com/tulir/mautrix-telegram

ARCHIVED README

Installation

$ git clone ...
$ cd matrix-appservice-tg
$ npm install

Setup

  1. Create a new Matrix room to act as the administration control room. Note its internal room ID.

  2. Create a telegram-config.yaml file for global configuration. There is a sample one to begin with in config/telegram-config-sample.yaml you may wish to copy and edit as appropriate. This needs the following keys:

    matrix_homeserver: "http URL pointing at the homeserver"
    
    matrix_user_domain: "domain part of the homeserver's name. Used for
                         ghost username generation"
    
    username_template: "template for virtual users, e.g. telegram_${USER}"
    
    matrix_admin_room: "the ID of the room created in step 2"
    
    auth_key_password: "a random string used to obfuscate authentication keys
                        stored in the user database"
    
  3. Pick/decide on a spare local TCP port number to run the application service on. This needs to be visible to the homeserver - take care to configure firewalls correctly if that is on another machine to the bridge. The port number will be noted as $PORT in the remaining instructions.

  4. Generate the appservice registration file (if the application service runs on the same server you can use localhost as $URL):

    $ node index.js --generate-registration -f telegram-registration.yaml  -u $URL:$PORT
    
  5. Start the actual application service. You can use forever

    $ forever start index.js --config telegram-config.yaml --port $PORT
    

    or node

    $ node index.js --config telegram-config.yaml --port $PORT
    
  6. Copy the newly-generated telegram-registration.yaml file to the homeserver. Add the registration file to your homeserver config (default homeserver.yaml):

    app_service_config_files:
       - ...
       - "/path/to/telegram-registration.yaml"
    

    Don't forget - it has to be a YAML list of strings, not just a single string.

    Restart your homeserver to have it reread the config file and establish a connection to the bridge.

  7. Invite the newly-created @telegrambot:DOMAIN user into the admin control room created at step 1.

The bridge should now be running.