From aaa89996a2e77fbf25fc82ec4006b3db9b579a7b Mon Sep 17 00:00:00 2001 From: Juanfran Date: Tue, 3 May 2016 22:20:53 +0200 Subject: [PATCH] prevent sending the event to the same user --- client.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client.coffee b/client.coffee index af53cae..f023c9c 100644 --- a/client.coffee +++ b/client.coffee @@ -20,13 +20,13 @@ class Client if msg.cmd == 'ping' @.sendPong() else if msg.cmd == 'auth' - @.auth(msg.data) + @.authUser(msg.data) else if msg.cmd == 'subscribe' @.addSubscription(msg.routing_key) else if msg.cmd == 'unsubscribe' @.removeSubscription(msg.routing_key) - auth: (auth) -> + authUser: (auth) -> if auth.token and auth.sessionId and signing.verify(auth.token) @.auth = auth