hdkv
/
i2_bot
Archived
1
Fork 0

Add strings.ToLower for bot username checking

master
Vladimir Hodakov 2018-04-07 17:24:48 +04:00
parent f306c259b1
commit fdcd53ffb3
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ func (ct *Chatter) userPrivilegesCheck(update *tgbotapi.Update, user *tgbotapi.U
c.Log.Debug("Checking user rights in headquarters chat...")
}
if update.Message.Chat.ID == gamesChatID && strings.Contains(user.UserName, "bot") {
if update.Message.Chat.ID == gamesChatID && strings.Contains(strings.ToLower(user.UserName), "bot") {
c.Log.Debug("Game bot with username @" + update.Message.From.UserName + " passed filtration")
return true
}