wamp.io
wamp.io copied to clipboard
Added 'client.id' argument in 'Call' event
As procedures could be protected or user-specific, add the client ID in the "Call" event.
I think client should be passed as an argument as bellow. Otherwise, we developers can not access the client instance to detect if the client is a normal user or a hacker.
app.on('subscribed', function (procUri, args, client, cb) {
if(!client.isAuthed){
//client.isAuthed is detect and set in #auth
client.close();
}
});