Give more weight to feed author's own About choices

This commit is contained in:
cel
2017-05-15 13:15:35 -10:00
parent 6b33c9e3b6
commit 54c06b5115
+3
View File
@@ -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) {