Added filter for disabling banned users from /send_league
This commit is contained in:
parent
05dee41421
commit
7af54a1b02
@ -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:
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user