nmdc-telegramfrontend/README.md

65 lines
2.6 KiB
Markdown
Raw Permalink Normal View History

2018-11-07 06:00:25 +00:00
# nmdc-telegramfrontend
![](https://img.shields.io/badge/written%20in-Go-blue.svg)
2018-06-03 03:27:50 +00:00
2018-11-07 06:00:25 +00:00
A bot to synchronise chat between an DC hub and a Telegram supergroup.
2018-06-03 06:24:08 +00:00
2018-11-07 06:00:25 +00:00
## Features
2018-06-03 06:24:08 +00:00
2018-06-09 01:57:59 +00:00
- Supports NMDC / NMDCS / ADC / ADCS hubs
- Automatically upload photos/files/videos/audio/stickers to a Contented server for DC users
- Fallback upload to thumbnail-only if exceeding declared Contented file size limit
- Convert telegram quoted messages to DC quoting style
- Exclude messages from multiple hub nicks (e.g. `Hub-Security` / `PtokaX` and helper bots)
2018-06-03 06:24:08 +00:00
- Standalone binary
2018-06-09 01:57:59 +00:00
- PM with native users
- Get native userlist inside the telegram group chat
- Option for length requirement on native nick
- Disconnect telegram users who fail to log in to the upstream hub
2018-06-03 06:24:08 +00:00
2018-11-07 06:00:25 +00:00
## Setup
2018-06-03 03:27:50 +00:00
2018-06-03 06:24:08 +00:00
Create a new telegram bot
2018-11-07 06:00:25 +00:00
1. Use BotFather to create a new bot
2. Use BotFather to disable its privacy mode for group chats
3. Use BotFather to add commands (that appear in the groupchat). Recommendation: `userlist - List native online users`
2018-06-03 03:27:50 +00:00
2018-06-03 06:24:08 +00:00
Create a telegram group
2018-11-07 06:00:25 +00:00
1. Manually create a group chat and add the bot to it
2. Convert group chat to supergroup
3. Grant bot to be an administrator (including ability to add more administrators)
4. Settings > "Who can add members" > Only administrators
5. Create an invite link
2018-06-03 03:27:50 +00:00
2018-11-07 06:00:25 +00:00
Handover to `nmdc-telegramfrontend`
1. Run this bot with no `-GroupChatID`, to learn the groupchat ID
2. Post a test message in the group chat, to discover the groupchat ID
3. Leave the group chat (long press on mobile, can't do it on desktop)
4. Run this bot with `-GroupChatID` for normal operation
2018-06-03 06:24:08 +00:00
2018-11-07 06:00:25 +00:00
## Usage
2018-06-03 06:24:08 +00:00
Chat with the bot to enter/leave the synchronised channel.
Sometimes the telegram invite links can take a few minutes to activate, especially if there has been unusual activity (e.g. frequent join/parts)
2018-06-09 01:57:59 +00:00
2018-11-07 06:00:25 +00:00
## Changelog
2018-06-09 01:57:59 +00:00
2018-06-10 02:21:06 +00:00
2018-06-10 1.0.1
- Send DC captions on TG photos and voice clips
- Send DC message when sharing a TG contact
- Fix a cosmetic issue with missing format specifier in log message
- [⬇️ nmdc-telegramfrontend-1.0.1-src.tar.bz2](https://git.ivysaur.me/attachments/857a8a57-3dae-44b4-9250-8c3691b393e1) *(100.84 KiB)*
- [⬇️ nmdc-telegramfrontend-1.0.1-linux64.tar.xz](https://git.ivysaur.me/attachments/86a10b0f-0ca5-4150-820c-e27451198a27) *(1.92 MiB)*
2018-06-10 02:21:06 +00:00
2018-06-09 06:45:04 +00:00
2018-06-09 1.0.0
2018-06-09 06:35:35 +00:00
- Initial public release
- [⬇️ nmdc-telegramfrontend-1.0.0-src.tar.bz2](https://git.ivysaur.me/attachments/0d357ce3-b026-45d0-b722-8f4f0cd47be5) *(101.17 KiB)*
- [⬇️ nmdc-telegramfrontend-1.0.0-linux64.tar.xz](https://git.ivysaur.me/attachments/643ad20b-814a-4883-94fa-876a4c361a83) *(1.92 MiB)*
2018-06-09 06:35:35 +00:00
2018-06-09 01:57:59 +00:00
2018-06-03
- Private beta