From a6512147371249c44c5c859d8743e7030d32977c Mon Sep 17 00:00:00 2001 From: Steven Weathers Date: Tue, 29 Oct 2024 19:56:43 -0400 Subject: [PATCH] Fix poker game endpoint to ignore duplicate user This fixes #641 --- internal/http/poker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/http/poker.go b/internal/http/poker.go index c21500f6..1c127051 100644 --- a/internal/http/poker.go +++ b/internal/http/poker.go @@ -277,7 +277,7 @@ func (s *Service) handleGetPokerGame() http.HandlerFunc { // don't allow retrieving battle details if battle has JoinCode and user hasn't joined yet if game.JoinCode != "" { userErr := s.PokerDataSvc.GetUserActiveStatus(gameID, sessionUserID) - if userErr != nil && userType != thunderdome.AdminUserType { + if userErr != nil && userErr.Error() != "DUPLICATE_BATTLE_USER" && userType != thunderdome.AdminUserType { s.Failure(w, r, http.StatusForbidden, Errorf(EUNAUTHORIZED, "USER_MUST_JOIN_BATTLE")) return }