Bot may prolong the temporary restrictions after user entering the right captcha
ForNeVeR opened this issue · 0 comments
ForNeVeR commented
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):
GreenCaptchaBot/CaptchaBot/Services/WelcomeService.cs
Lines 92 to 95 in 3efc112
I propose this code to restore the restriction date (if available in preBanPermissions
), too.