Bridge Telegram (https://telegram.org/) - Matrix (https://matrix.org/)
Using https://github.com/rubenlagus/TelegramBots, libwepb http://downloads.webmproject.org/releases/webp/index.html and Java 1.8.0_172.
-
Create a folder called "files" in the working directory
-
Copy
sample_botsettings.json
inside the new folder and call itbotsettings.json
-
Edit the new file, changing every parameter (keep every value as a string between quotes):
matrixhomeserver
: change only the address of the server and keep the rest (it should be likehttps://something/_matrix/
)tgtoken
: write the telegram bot token that @BotFather bot gives youmatrixuser
: write the username of the matrix bot (like@username:server.com
)matrixpswd
: write the password of the matrix bot
Then, for every pair of room you want to link togheter:
matrixname
: write the name of the matrix roomtgname
: write the name of the Telegram roomtgid
: write the id of the telegram chat. You can get it by sending the/chatid
command to the Telegram Botmatrixid
: write the id of the matrix room. You can get it from the room settings, under "internal id" (like!something:server.com
)lastmessageid
: this parameter is managed by the application, don't edit it
-
Start the program
Now the program should send every text message it receives from the telegram chat room to the linked matrix chat room and vice versa.