diff --git a/server/lib/peertube-socket.ts b/server/lib/peertube-socket.ts index ad2bb4845..26ced351f 100644 --- a/server/lib/peertube-socket.ts +++ b/server/lib/peertube-socket.ts @@ -39,8 +39,9 @@ class PeerTubeSocket { if (!sockets) return + const notificationMessage = notification.toFormattedJSON() for (const socket of sockets) { - socket.emit('new-notification', notification.toFormattedJSON()) + socket.emit('new-notification', notificationMessage) } }