A bot to synchronise chat between an DC hub and a Telegram supergroup. https://code.ivysaur.me/nmdc-telegramfrontend/
Go to file
2018-12-31 18:02:28 +13:00
dist doc: move README to top-level md file 2018-11-07 19:00:25 +13:00
vendor convert to go modules 2018-11-07 18:55:32 +13:00
.gitignore hg2git: convert ignores, remove hgtags 2018-11-07 18:51:54 +13:00
coalesce.go extract message-coalesce-buffer to separate file 2018-06-06 19:39:22 +12:00
contented.go support uploading all other telegram filetypes 2018-06-09 13:50:07 +12:00
go.mod convert to go modules 2018-11-07 18:55:32 +13:00
go.sum convert to go modules 2018-11-07 18:55:32 +13:00
linkBotMenu.go move user registration to linkbot menu file 2018-06-06 19:41:08 +12:00
main.go isolate debugging messages behind new -Verbose flag (argument, not in config file) 2018-06-03 18:51:59 +12:00
Makefile build: extra ldflags 2018-11-07 18:57:11 +13:00
NTFConfig.go contented: initial work on file upload support 2018-06-06 19:35:54 +12:00
NTFServer.go send dc message when contacts are shared in TG 2018-06-10 14:16:12 +12:00
README.md doc: move README to top-level md file 2018-11-07 19:00:25 +13:00
version.go initial commit 2018-06-03 15:27:50 +12:00

nmdc-telegramfrontend

A bot to synchronise chat between an DC hub and a Telegram supergroup.

Features

  • 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)
  • Standalone binary
  • 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

Setup

Create a new telegram bot

  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

Create a telegram group

  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

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

Usage

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)

Changelog

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

2018-06-09 1.0.0

  • Initial public release

2018-06-03

  • Private beta