Archived
1

Add debug on ProtectChat sequence

This commit is contained in:
Vladimir Hodakov 2018-04-07 17:22:00 +04:00
parent 24e619a446
commit f306c259b1

View File

@ -33,7 +33,19 @@ func (ct *Chatter) userPrivilegesCheck(update *tgbotapi.Update, user *tgbotapi.U
} }
} }
switch update.Message.Chat.ID {
case academyChatID:
c.Log.Debug("Checking user rights in academy chat...")
case bastionChatID:
c.Log.Debug("Checking user rights in bastion chat...")
case gamesChatID:
c.Log.Debug("Checking user rights in games chat...")
case hqChatID:
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(user.UserName, "bot") {
c.Log.Debug("Game bot with username @" + update.Message.From.UserName + " passed filtration")
return true return true
} }
@ -62,6 +74,8 @@ func (ct *Chatter) userPrivilegesCheck(update *tgbotapi.Update, user *tgbotapi.U
} }
} }
c.Log.Debug("User failed to prove identity. Ban sequence arrived.")
return false return false
} }