aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/about.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/about.js b/lib/about.js
index 4605c4b..5f1c618 100644
--- a/lib/about.js
+++ b/lib/about.js
@@ -117,15 +117,20 @@ About.prototype.get = function (dest, cb) {
if (c.publicWebHosting) about.publicWebHosting = c.publicWebHosting
}, function (err) {
if (err) return cb(err)
+ var destAbout = aboutByFeedFollowed[dest] || aboutByFeed[dest]
// bias the author's choices by giving them an extra vote
- if (follows[dest]) aboutByFeedFollowed._author = aboutByFeedFollowed[dest]
- else aboutByFeed._author = aboutByFeed[dest]
+ if (destAbout) {
+ if (follows[dest]) aboutByFeedFollowed._author = destAbout
+ else aboutByFeed._author = destAbout
+ }
var about = {}
var followedAbout = computeTopAbout(aboutByFeedFollowed)
var topAbout = computeTopAbout(aboutByFeed)
for (var k in topAbout) about[k] = topAbout[k]
// prefer followed feeds' choices
for (var k in followedAbout) about[k] = followedAbout[k]
+ // if we follow the destination/author feed, prefer its choices
+ if (follows[dest]) for (var k in destAbout) about[k] = destAbout[k]
// always prefer own choices
for (var k in myAbout) about[k] = myAbout[k]
cb(null, about)