Skip to content

Commit

Permalink
Send WS message to all players except the invoker. Closes #36
Browse files Browse the repository at this point in the history
  • Loading branch information
myOmikron committed Apr 18, 2023
1 parent af6701e commit 4b2946b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/handler/games.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ pub async fn push_game_update(
game_data_id: new_data_id as u64,
game_data: req.game_data.clone(),
};
for player in players.into_iter().filter(|x| *x == uuid) {
for player in players.into_iter().filter(|x| *x != uuid) {
if let Err(err) = ws_manager_chan
.send(WsManagerMessage::SendMessage(player, msg.clone()))
.await
Expand Down

0 comments on commit 4b2946b

Please sign in to comment.