From 54c06b511566bde688d64e44d057778d19a45258 Mon Sep 17 00:00:00 2001 From: cel Date: Mon, 15 May 2017 13:15:35 -1000 Subject: [PATCH] Give more weight to feed author's own About choices --- lib/about.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/about.js b/lib/about.js index fdf9653..eb424a8 100644 --- a/lib/about.js +++ b/lib/about.js @@ -31,10 +31,13 @@ module.exports = function (sbot, id, cb) { // Usually we would want to handle renames for dead feeds and such, // but for ssb-viewer it is mostly public/archival content anyway, // so we'll let the popular name stand. + // Except: prefer the feed's own choices slightly var propValueCounts = {/* prop: {value: count} */} var topValues = {/* prop: value */} var topValueCounts = {/* prop: count */} var about = {} + // bias the feed's own choice by 1 + aboutByFeed._author = aboutByFeed[id] || {} for (var feed in aboutByFeed) { var feedAbout = aboutByFeed[feed] for (var prop in feedAbout) {