Archived
1

Added filter for disabling banned users from /send_league

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

View File

@@ -121,7 +121,7 @@ func (ct *Chatter) GetAllPrivateChats() ([]dbmapping.Chat, bool) {
func (ct *Chatter) GetLeaguePrivateChats() ([]dbmapping.Chat, bool) {
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 {
c.Log.Error(err)
return privateChats, false