From: Chocobozzz Date: Fri, 13 May 2016 13:02:51 +0000 (+0200) Subject: Fix friends making X-Git-Tag: v0.0.1-alpha~938 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d6ea0175cbfc9995c3b2ec23866f7abafa9e3904;p=oweals%2Fpeertube.git Fix friends making --- diff --git a/server/lib/friends.js b/server/lib/friends.js index f4f2ada87..e052574a5 100644 --- a/server/lib/friends.js +++ b/server/lib/friends.js @@ -156,10 +156,12 @@ function computeWinningPods (urls, podsScore) { // Only add a pod if it exists in more than a half base pods const podsList = [] const baseScore = urls.length / 2 - Object.keys(baseScore).forEach(function (pod) { + Object.keys(podsScore).forEach(function (pod) { if (podsScore[pod] > baseScore) podsList.push({ url: pod }) }) - + console.log(urls) + console.log(podsScore) + console.log(podsList) return podsList }