]> git.cworth.org Git - zombocom-ai/blobdiff - index.js
Add a new 'reset' event from server to client before replay
[zombocom-ai] / index.js
index cd1911def06ba21b1197a72c9bd6b1d5405b0989..9d4028fbd4cad5a1889ddadc037fd39949388946 100644 (file)
--- a/index.js
+++ b/index.js
@@ -78,6 +78,7 @@ io.on('connection', (socket) => {
     console.log("Connection from client with " + socket.request.session.views + " views.");
 
     // Replay old comments and images to a newly-joining client
+    socket.emit('reset');
     state.comments.forEach((comment) => {
         socket.emit('comment', comment)
     });