From 63051eb9b9be9aee4a18f4aafca6e5217893b3c9 Mon Sep 17 00:00:00 2001 From: Vladimir Hodakov Date: Sun, 26 Nov 2017 16:12:49 +0400 Subject: [PATCH] Special case for adding special user to squad --- lib/squader/squader.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/squader/squader.go b/lib/squader/squader.go index 167c757..5025a79 100644 --- a/lib/squader/squader.go +++ b/lib/squader/squader.go @@ -346,9 +346,12 @@ func (s *Squader) AddUserToSquad(update *tgbotapi.Update, adderRaw *dbmapping.Pl c.Log.Error(err.Error()) return s.squadUserAdditionFailure(update) } - _, ok = c.Users.GetProfile(playerRaw.ID) - if !ok { - return s.squadUserAdditionFailure(update) + + if playerRaw.Status != "special" { + _, ok = c.Users.GetProfile(playerRaw.ID) + if !ok { + return s.squadUserAdditionFailure(update) + } } if !c.Users.PlayerBetterThan(adderRaw, "admin") {