Archived
1

Special case for adding special user to squad

This commit is contained in:
Vladimir Hodakov 2017-11-26 16:12:49 +04:00
parent 60365e1637
commit 63051eb9b9

View File

@ -346,9 +346,12 @@ func (s *Squader) AddUserToSquad(update *tgbotapi.Update, adderRaw *dbmapping.Pl
c.Log.Error(err.Error()) c.Log.Error(err.Error())
return s.squadUserAdditionFailure(update) return s.squadUserAdditionFailure(update)
} }
_, ok = c.Users.GetProfile(playerRaw.ID)
if !ok { if playerRaw.Status != "special" {
return s.squadUserAdditionFailure(update) _, ok = c.Users.GetProfile(playerRaw.ID)
if !ok {
return s.squadUserAdditionFailure(update)
}
} }
if !c.Users.PlayerBetterThan(adderRaw, "admin") { if !c.Users.PlayerBetterThan(adderRaw, "admin") {