umputun / tg-spam

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

Ban confirmed in -1 seconds #115

Closed sphinxy closed 3 months ago

sphinxy commented 3 months ago

Version v1.13.2-da412c0-2024-06-25T20:24:56Z

When I click "keep banned" button, the text says "_ban confirmed by sphinxynest in -1s" Minus one second is impossible)

p.s. Also, all my co-admins are complaining about button order, it causes to wrong click on "unban for real" Current state: you have button "change ban", click on it, then usually it short delay with spinner then have two buttons, "unban for real" and "keep it banned"

image image

"Unban for real" is directly under your finger and admins click it wrongly. Happens many time for different people, especially when it's a nighttime or morning and they are sleepy.

Proposal: make button order reversed, so "default" action will be "keep it banned", 95% of time it's really a default action

umputun commented 3 months ago

I'm a bit confused about the proposed default and the use-case. In normal mode (non-training), the user is already banned by the time the admin receives the report. The only reason to click on "change ban" in this case is to "unban for real." "Keep it banned" is like a cancel button if "change ban" was clicked by mistake.

Maybe switching the order of buttons for the training mode makes more sense, but it might lead to a confusing UI with buttons in different orders across different modes.

sphinxy commented 3 months ago

My case is about the --soft-ban mode. We get many messages just waiting for "ban for real", it's the default case. You have to move your finger after clicking "change ban" to do it. Sometimes, especially it some delays happens, people misclick it.

It is also possible to change the order on the first screen, then it will be "info" and "change ban" first, "unban for real" and "keep it banned" on second screen

umputun commented 3 months ago

I understand, but my issue lies with a normal mode where the default action is the opposite.

umputun commented 3 months ago

116 should eliminate negative duration. Regarding UI change - I still don't see a universal way to make both normal and soft/training modes happy.

If the fix works for you, feel free to close the ticket. For the potential UI change, I would suggest opening a discussion as the behavior you have described is not a bug but rather intentional.