Merge branch 'feature/strong-model-types' into develop
authorChocobozzz <me@florianbigard.com>
Thu, 22 Aug 2019 08:43:11 +0000 (10:43 +0200)
committerChocobozzz <me@florianbigard.com>
Thu, 22 Aug 2019 08:43:11 +0000 (10:43 +0200)
1  2 
server/lib/emailer.ts
server/lib/peertube-socket.ts

Simple merge
index 17748fd1813186509ab5c63a54ebfc8771475703,1c7b09175720c287c74751a9a9f3042a334bd066..ad2bb4845d45319feae5993ed5bec8a4a5dfbdc5
@@@ -34,14 -32,12 +34,14 @@@ class PeerTubeSocket 
        })
    }
  
-   sendNotification (userId: number, notification: UserNotificationModel) {
+   sendNotification (userId: number, notification: UserNotificationModelForApi) {
 -    const socket = this.userNotificationSockets[userId]
 +    const sockets = this.userNotificationSockets[userId]
  
 -    if (!socket) return
 +    if (!sockets) return
  
 -    socket.emit('new-notification', notification.toFormattedJSON())
 +    for (const socket of sockets) {
 +      socket.emit('new-notification', notification.toFormattedJSON())
 +    }
    }
  
    static get Instance () {