diff options
Diffstat (limited to 'plugin/notes-server/index.js')
-rw-r--r-- | plugin/notes-server/index.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugin/notes-server/index.js b/plugin/notes-server/index.js index b6779d3..df917f1 100644 --- a/plugin/notes-server/index.js +++ b/plugin/notes-server/index.js @@ -16,8 +16,12 @@ var opts = { io.sockets.on( 'connection', function( socket ) { - socket.on( 'state', function( state ) { - socket.broadcast.emit( 'state', state ); + socket.on( 'connect', function( data ) { + socket.broadcast.emit( 'connect', data ); + }); + + socket.on( 'statechanged', function( data ) { + socket.broadcast.emit( 'statechanged', data ); }); }); |