From: John Livingston <38844060+JohnXLivingston@users.noreply.github.com> Date: Fri, 23 Aug 2019 07:05:30 +0000 (+0200) Subject: fixes 2065: optimisation (#2073) X-Git-Tag: v2.0.0-rc.1~112 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=20ec03846ddb40d8aeaa87fc92b8bd7994c3ecf7;p=oweals%2Fpeertube.git fixes 2065: optimisation (#2073) * fixes 2065: optimisation * Update peertube-socket.ts --- 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) } }