Give more weight to feed author's own About choices
This commit is contained in:
@@ -31,10 +31,13 @@ module.exports = function (sbot, id, cb) {
|
|||||||
// Usually we would want to handle renames for dead feeds and such,
|
// Usually we would want to handle renames for dead feeds and such,
|
||||||
// but for ssb-viewer it is mostly public/archival content anyway,
|
// but for ssb-viewer it is mostly public/archival content anyway,
|
||||||
// so we'll let the popular name stand.
|
// so we'll let the popular name stand.
|
||||||
|
// Except: prefer the feed's own choices slightly
|
||||||
var propValueCounts = {/* prop: {value: count} */}
|
var propValueCounts = {/* prop: {value: count} */}
|
||||||
var topValues = {/* prop: value */}
|
var topValues = {/* prop: value */}
|
||||||
var topValueCounts = {/* prop: count */}
|
var topValueCounts = {/* prop: count */}
|
||||||
var about = {}
|
var about = {}
|
||||||
|
// bias the feed's own choice by 1
|
||||||
|
aboutByFeed._author = aboutByFeed[id] || {}
|
||||||
for (var feed in aboutByFeed) {
|
for (var feed in aboutByFeed) {
|
||||||
var feedAbout = aboutByFeed[feed]
|
var feedAbout = aboutByFeed[feed]
|
||||||
for (var prop in feedAbout) {
|
for (var prop in feedAbout) {
|
||||||
|
|||||||
Reference in New Issue
Block a user