GreenCaptchaBot
GreenCaptchaBot copied to clipboard
Bot may prolong the temporary restrictions after user entering the right captcha
Consider the following scenario.
- The user has been temporarily restricted in the chat.
- The user has left the chat.
- The user has re-entered the chat, and has been muted by the bot.
- The user has entered the right captcha.
After that, this code will restore the user permissions from step 1, but will prolong them forever (i.e. won't set a restrictUntil
date): https://github.com/ImoutoChan/GreenCaptchaBot/blob/3efc1124bc662ea16b890b93591f8179a094b8f8/CaptchaBot/Services/WelcomeService.cs#L92-L95
I propose this code to restore the restriction date (if available in preBanPermissions
), too.