From 8482c3af0ae87dc89e44f4ab1161e0b692e215f2 Mon Sep 17 00:00:00 2001 From: Yoann Ciabaud Date: Fri, 24 Feb 2017 18:08:44 +0100 Subject: [PATCH] Add extra data on ws annouce event --- lib/client/websocket-tracker.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/client/websocket-tracker.js b/lib/client/websocket-tracker.js index 894408e..c37ea7f 100644 --- a/lib/client/websocket-tracker.js +++ b/lib/client/websocket-tracker.js @@ -266,11 +266,8 @@ WebSocketTracker.prototype._onAnnounceResponse = function (data) { } if (data.complete != null) { - self.client.emit('update', { - announce: self.announceUrl, - complete: data.complete, - incomplete: data.incomplete - }) + data.announce = self.announceUrl + self.client.emit('update', data) } var peer