From 38b608ec5cabe13d76846a2c0b48d706778233a4 Mon Sep 17 00:00:00 2001 From: Miguel Gonzalez Date: Thu, 26 Apr 2018 11:48:00 +0200 Subject: [PATCH] fix: Check if user is authenticated --- client.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.coffee b/client.coffee index 0ffb721..200cad9 100644 --- a/client.coffee +++ b/client.coffee @@ -32,7 +32,7 @@ class Client else if msg.cmd == 'auth' and msg.data @.authUser(msg.data) else if msg.cmd == 'subscribe' and msg.routing_key - if msg.routing_key.indexOf("live_notifications") == 0 + if @.auth and msg.routing_key.indexOf("live_notifications") == 0 userId = signing.getUserId(@.auth.token) @.addSubscription("live_notifications.#{userId}") else