From 88d1ac2556b5eefae399c2186237e1fd32ff87ac Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 7 Mar 2018 19:03:32 +0900 Subject: [PATCH] Fix bug --- src/api/stream/othello-game.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/stream/othello-game.ts b/src/api/stream/othello-game.ts index 59d964777..a5fb379e8 100644 --- a/src/api/stream/othello-game.ts +++ b/src/api/stream/othello-game.ts @@ -28,6 +28,7 @@ export default function(request: websocket.request, connection: websocket.connec const game = await Game.findOne({ _id: gameId }); if (game.is_ended) return; + if (!game.black_user_id.equals(user._id) && !game.white_user_id.equals(user._id)) return; const o = new Othello();