git ssb

30+

cel / git-ssb-web



Commit c686096f58604cf1e3d26154208a452943606d2f

Merge branch 'master' of ssb://%q5d5Du+9WkaSdjc8aJPZm+jMrqgo0tmfR+RcX5ZZ6H4=.sha256

Ev Bogue committed on 7/29/2016, 12:35:36 PM
Parent: 5099c93781d03cac5a31333095ab9ed77255ce1e
Parent: d810f808a677b78123f6e140fa495f20b7085861

Files changed

lib/about.jschanged
package.jsonchanged
lib/about.jsView
@@ -11,8 +11,12 @@
1111 var cat = require('pull-cat')
1212 var asyncMemo = require('asyncmemo')
1313 var u = require('./util')
1414
15 +function getLink(obj) {
16 + return typeof obj === 'string' ? obj : obj ? obj.link : null
17 +}
18 +
1519 module.exports = function (sbot, id) {
1620 var getAbout = asyncMemo(getAboutFull, sbot, id)
1721
1822 getAbout.getName = function (id, cb) {
@@ -70,9 +74,9 @@
7074 var c = msg.value.content
7175 if (!info.name && c.name)
7276 info.name = c.name
7377 if (!info.image && c.image)
74- info.image = c.image.link
78 + info.image = getLink(c.image)
7579 }, function (err) {
7680 if (err && err !== true) return cb(err)
7781 if (!info.name) info.name = u.truncate(target, 20)
7882 cb(null, info)
@@ -96,14 +100,14 @@
96100 // TODO: give about from source (self) priority over about from owner
97101 if (c.name)
98102 info.name = c.name
99103 if (c.image)
100- info.image = c.image.link
104 + info.image = getLink(c.image)
101105 } else {
102106 if (c.name && !info.name)
103107 info.name = c.name
104108 if (c.image && !info.image)
105- info.image = c.image.link
109 + info.image = getLink(c.image)
106110 }
107111 }, function (err) {
108112 if (err) console.error('about', err)
109113 })
package.jsonView
@@ -1,7 +1,7 @@
11 {
22 "name": "git-ssb-web",
3- "version": "1.17.1",
3 + "version": "1.17.2",
44 "description": "web server for browsing git repos on ssb",
55 "bin": "server.js",
66 "dependencies": {
77 "asyncmemo": "^0.1.0",

Built with git-ssb-web