Guest User

Untitled

a guest
Dec 16th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. // ...
  2.  
  3. // User is typing
  4. socket.on('is:typing', function() {
  5. _user = _.find(users, {id: socket.id});
  6. socket.broadcast.emit('user:is:typing', _user);
  7. });
  8.  
  9. // User stop typing
  10. socket.on('stop:typing', function() {
  11. _user = _.find(users, {id: socket.id});
  12. socket.broadcast.emit('user:stop:typing', _user);
  13. });
  14.  
  15. // ...
Add Comment
Please, Sign In to add comment