Skip to content

Commit

Permalink
fix: emit userStatus was in wrong location preventing it from firing
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Nov 10, 2022
1 parent 54998af commit 3978852
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ class SocketServer extends EventEmitter{
if (user_id) {
if (!socket.config.user_id ) {
socket.config.user_id = user_id

this.emit('userStatus', socket, {user_id, userStatus: 'on', organization_id});
}
this.emit('userStatus', socket, {user_id, userStatus: 'on', organization_id});
}

//. check permission
Expand Down

0 comments on commit 3978852

Please sign in to comment.