git ssb

9+

cel / ssb-viewer



Commit dffd43f062a271d3a9be609e1129bf5ad153a4ff

Let people name themselves and support description in about

Anders Rune Jensen committed on 5/12/2017, 8:06:54 PM
Parent: f49493c61faed9bcaac665b3e01ce9e8b78ad47e

Files changed

lib/about.jschanged
lib/about.jsView
@@ -5,20 +5,22 @@
55 return typeof val === 'string' ? val : val && val.link
66 }
77
88 function reduceAbout(about, msg) {
9- var c = msg.value.content
10- if (!c) return about
11- if (c.name) about.name = c.name.replace(/^@?/, '@')
12- if (c.image) about.image = linkDest(c.image)
13- return about
9 + var c = msg.value.content
10 + if (!c) return about
11 + if (c.name) about.name = c.name.replace(/^@?/, '@')
12 + if (c.image) about.image = linkDest(c.image)
13 + if (c.description) about.description = c.description
14 + return about
1415 }
1516
1617 module.exports = function (sbot, id, cb) {
1718 var about = {}
1819 pull(
1920 sbot.links({
2021 rel: 'about',
22 + source: id,
2123 dest: id,
2224 values: true,
2325 }),
2426 pull.collect(function (err, msgs) {

Built with git-ssb-web