mirror of
https://github.com/Thream/socketio-jwt.git
synced 2024-07-21 09:38:31 +02:00
fixes #40
This commit is contained in:
parent
4a50d9e397
commit
c5303a3d7a
@ -37,7 +37,7 @@ function onAuthorizeSuccess(data, accept){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onAuthorizeFail(data, message, error, accept){
|
function onAuthorizeFail(data, message, error, accept){
|
||||||
if(critical)
|
if(error)
|
||||||
throw new Error(message);
|
throw new Error(message);
|
||||||
console.log('failed connection to socket.io:', message);
|
console.log('failed connection to socket.io:', message);
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ This function gives you the ability to filter all connected sockets via a user p
|
|||||||
passportSocketIo.filterSocketsByUser(io, function(user){
|
passportSocketIo.filterSocketsByUser(io, function(user){
|
||||||
return user.gender === 'female';
|
return user.gender === 'female';
|
||||||
}).forEach(function(socket){
|
}).forEach(function(socket){
|
||||||
socket.send('msg', 'hello, woman!');
|
socket.emit('messsage', 'hello, woman!');
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user