Commit 54c06b511566bde688d64e44d057778d19a45258
Give more weight to feed author's own About choices
cel committed on 5/15/2017, 11:15:35 PMParent: 6b33c9e3b67e99cb19a558a3a9ba0add813c4442
Files changed
lib/about.js | changed |
lib/about.js | ||
---|---|---|
@@ -30,12 +30,15 @@ | ||
30 | 30 … | // Use whatever properties have the most counts. |
31 | 31 … | // Usually we would want to handle renames for dead feeds and such, |
32 | 32 … | // but for ssb-viewer it is mostly public/archival content anyway, |
33 | 33 … | // so we'll let the popular name stand. |
34 … | + // Except: prefer the feed's own choices slightly | |
34 | 35 … | var propValueCounts = {/* prop: {value: count} */} |
35 | 36 … | var topValues = {/* prop: value */} |
36 | 37 … | var topValueCounts = {/* prop: count */} |
37 | 38 … | var about = {} |
39 … | + // bias the feed's own choice by 1 | |
40 … | + aboutByFeed._author = aboutByFeed[id] || {} | |
38 | 41 … | for (var feed in aboutByFeed) { |
39 | 42 … | var feedAbout = aboutByFeed[feed] |
40 | 43 … | for (var prop in feedAbout) { |
41 | 44 … | var value = feedAbout[prop] |
Built with git-ssb-web