From dffd43f062a271d3a9be609e1129bf5ad153a4ff Mon Sep 17 00:00:00 2001 From: Anders Rune Jensen Date: Fri, 12 May 2017 22:06:54 +0200 Subject: [PATCH] Let people name themselves and support description in about --- lib/about.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/about.js b/lib/about.js index 553135c..3e5a0b6 100644 --- a/lib/about.js +++ b/lib/about.js @@ -6,11 +6,12 @@ function linkDest(val) { } function reduceAbout(about, msg) { - var c = msg.value.content - if (!c) return about - if (c.name) about.name = c.name.replace(/^@?/, '@') - if (c.image) about.image = linkDest(c.image) - return about + var c = msg.value.content + if (!c) return about + if (c.name) about.name = c.name.replace(/^@?/, '@') + if (c.image) about.image = linkDest(c.image) + if (c.description) about.description = c.description + return about } module.exports = function (sbot, id, cb) { @@ -18,6 +19,7 @@ module.exports = function (sbot, id, cb) { pull( sbot.links({ rel: 'about', + source: id, dest: id, values: true, }),