Archived
1

PokememBroInstinkt chat bans fix

This commit is contained in:
2017-12-23 21:08:57 +04:00
parent 24e4904807
commit f6d8d064ed
2 changed files with 7 additions and 1 deletions

View File

@@ -12,8 +12,14 @@ import (
func (ct *Chatter) userPrivilegesCheck(update *tgbotapi.Update, user *tgbotapi.User) bool {
// There are two special chats, pointed by config, where any member of league may be
defaultChatID, _ := strconv.ParseInt(c.Cfg.SpecialChats.DefaultID, 10, 64)
bastionChatID, _ := strconv.ParseInt(c.Cfg.SpecialChats.BastionID, 10, 64)
academyChatID, _ := strconv.ParseInt(c.Cfg.SpecialChats.AcademyID, 10, 64)
if update.Message.Chat.ID == defaultChatID {
return true
}
// There are special users, which will bypass these checks
specialUsers := []string{"gantz_yaka", "agentpb", "pbhelp"}