fix: enable official bots to connect to external tournament server #71
Reference in New Issue
Block a user
Delete Branch "fix-bot-communication"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two bugs prevented official bots from joining the external tournament-server:
JWT claim mismatch — bot tokens lacked the
isBot: trueclaim thetournament server requires. Added the claim to generateBotToken() in
AccountService, which covers both user-owned bots and official bots.
Broken join flow — TournamentBotGamePlayer.joinTournament() called
registerBot() which hit POST /api/auth/register on the tournament server,
an endpoint that does not exist. Removed registerBot() and updated
JoinTournamentRequest to accept a botToken field so the caller supplies
the pre-existing NowChessSystems token directly.