summaryrefslogtreecommitdiff
path: root/src/api/stream
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/stream')
-rw-r--r--src/api/stream/othello-game.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/api/stream/othello-game.ts b/src/api/stream/othello-game.ts
index 59d964777d..a5fb379e80 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();