umputun / tg-spam

Anti-Spam bot for Telegram and anti-spam library
https://tg-spam.umputun.dev
MIT License
224 stars 39 forks source link

Change unban mechanics #16

Closed umputun closed 11 months ago

umputun commented 11 months ago

A built-in web server proved to be a pain as it requires a non-trivial setup, like adding reverse proxy, managing firewall ports/forwarding, terminating SSL, etc. We better use the telegram callback (i.e., a button with action) instead of the link, which works directly with telegram protocol and doesn't require any exceptional support on the client side.

Important: the change is partially breaking in case the user runs with command-line parameters. --admin.url, --admin.secret, and --admin.address are not supported anymore, as we are not running a web server.

In case parameters are set via env, it will be fine, as ADMIN_URL, ADMIN_SECRET, and ADMIN_ADDRESS will be ignored.