Fix bug where we incorrectly added a user as a player instead of a spectator #189
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a pretty niche scenario where a user could join a game that is already in-progress and get assigned the role of "Player." This happened when the game was started with a Temporary Moderator, but then someone was killed and we established a Dedicated Mod. In that case, the server failed to detect the state of the game correctly and assumed they should be a Player.
To fix this, we added a check for the status being "In Progess" as a condition where we should add any new joiners as spectators.