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

Update the list of approved users #11

Closed slawiko closed 11 months ago

slawiko commented 11 months ago

It is not clear how to update the list of approved users.

It only loads list of users from file during the bot start: https://github.com/umputun/tg-spam/blob/master/app/main.go#L162 , but how (and when?) can I add user to that list.

My assumption is that list has to be updated after clicking unban admin?

Anyway, could you please explain how it should work from your perspective and I will do my best to fix that if needed.

umputun commented 11 months ago

This is fully automatic; the user can't change it manually. Please see docs:

Another useful feature is the ability to keep the list of approved users persistently. The bot will not ban those users and won't check their messages for spam because they have already passed the initial check. IDs of those users are kept in the internal list and stored in the file approved-users.txt. To enable this feature, the user must specify the file with the list of approved users with --files.approved-users=, [$FILES_APPROVED_USERS] parameter. The file is binary and can't be edited manually. The bot handles it automatically if the parameter is set and --paranoid mode is not enabled.

i'll move it to dicusssions