Archived
1

Added filter for disabling banned users from /send_league

This commit is contained in:
Vladimir Hodakov 2018-02-16 12:26:04 +04:00
parent 05dee41421
commit 7af54a1b02
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
Copyright 2017 Vladimir "fat0troll" Hodakov. Copyright 2017-2018 Vladimir "fat0troll" Hodakov.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View File

@ -121,7 +121,7 @@ func (ct *Chatter) GetAllPrivateChats() ([]dbmapping.Chat, bool) {
func (ct *Chatter) GetLeaguePrivateChats() ([]dbmapping.Chat, bool) { func (ct *Chatter) GetLeaguePrivateChats() ([]dbmapping.Chat, bool) {
privateChats := []dbmapping.Chat{} privateChats := []dbmapping.Chat{}
err := c.Db.Select(&privateChats, "SELECT c.* FROM chats c, players p WHERE c.chat_type='private' AND p.telegram_id = c.telegram_id AND p.league_id = 1 AND p.status != 'spy' AND p.status != 'league_changed'") err := c.Db.Select(&privateChats, "SELECT c.* FROM chats c, players p WHERE c.chat_type='private' AND p.telegram_id = c.telegram_id AND p.league_id = 1 AND p.status != 'spy' AND p.status != 'league_changed' AND p.status !='banned'")
if err != nil { if err != nil {
c.Log.Error(err) c.Log.Error(err)
return privateChats, false return privateChats, false