fix: Check if user is authenticated
parent
2efba0baf9
commit
38b608ec5c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue