Check messages with regular expressions and forward them to selected chats/groups.
- Install docker
curl -fsSL https://get.docker.com -o get-docker.sh sudo sh ./get-docker.sh
git clone https://github.com/xtrime-ru/TelegramRepost.git && cd TelegramRepost
docker compose pull
cp .env.example .env
- Edit config
.env
:- Obtain
TELEGRAM_API_ID
andTELEGRAM_API_HASH
from https://my.telegram.org/ - Check
RECIPIENTS
andKEYWORDS
in.env
- Obtain
- Run interactive shell and login to account in cli:
docker compose run --rm tg-repost
- stop container:
CTRL+C
- Start containers in background:
docker compose up -d
- Always restart container after .env update:
docker compose restart tg-repost
MadelineProto uses mysql to store its session and cache. It also able to store user data. By default, tg-repost will start own mariadb container at root@127.0.0.1:10306. Password is empty string.
Currently, all data in db is serialized.
tg-repost can save all incoming messages/updates to madelineProto database. Enable SAVE_MESSAGES in .env. Check table "$YourID_EventHandler_messages_db"
You can add sources list to table "$YourID_EventHandler_sources_db". tg-repost will check this table every 60 seconds and update list of listening channels.