From 7fb7cc48054df00dafe235e5877b0c34eec20feb Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Thu, 14 May 2020 21:48:00 -0400 Subject: [PATCH] Restore incoming event handling --- assets/js/app.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index d3da957..b97d716 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -49,13 +49,8 @@ app.ports.joinRoom.subscribe(options => { }) // Incoming room events - const handle = (type) => (data) => - app.ports.roomEvents.send({ - "type": type, - "data": data - }) - ["vote", "reset"] - .forEach(event => channel.on(event, handle(event))) + channel.on("vote", app.ports.gotVote.send) + channel.on("reset", app.ports.gotReset.send) // Outgoing room events app.ports.roomActions.subscribe(action => {