]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/peertube-socket.ts
Migrate i18n messages to new format
[github/Chocobozzz/PeerTube.git] / server / lib / peertube-socket.ts
index e27963e606b52d6ea6c4ade1272000aec5f50441..0740e378e6f1d635b75d624d6e458420d75a2c83 100644 (file)
@@ -22,7 +22,7 @@ class PeerTubeSocket {
     io.of('/user-notifications')
       .use(authenticateSocket)
       .on('connection', socket => {
-        const userId = socket.handshake.query.user.id
+        const userId = socket.handshake.auth.user.id
 
         logger.debug('User %d connected on the notification system.', userId)
 
@@ -42,12 +42,14 @@ class PeerTubeSocket {
         socket.on('subscribe', ({ videoId }) => {
           if (!isIdValid(videoId)) return
 
+          /* eslint-disable @typescript-eslint/no-floating-promises */
           socket.join(videoId)
         })
 
         socket.on('unsubscribe', ({ videoId }) => {
           if (!isIdValid(videoId)) return
 
+          /* eslint-disable @typescript-eslint/no-floating-promises */
           socket.leave(videoId)
         })
       })