Let people name themselves and support description in about
This commit is contained in:
+7
-5
@@ -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,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user