prevent sending the event to the same user

master
Juanfran 2016-05-03 22:20:53 +02:00
parent 3bb5179619
commit aaa89996a2
1 changed files with 2 additions and 2 deletions

View File

@ -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