Commit da1367d2d8ed6401096f0f474ba0df556e8cc6d2
Merge branch 'fixes'
Dominic Tarr committed on 8/14/2016, 2:16:00 AMParent: 5404eb9aac0d3f76707c6bf2fa5b57c55f46cb64
Parent: bbf9e423c5c7c91fb95d8d2b7f0bd30e6615b94a
Files changed
modules/avatar-image.js | changed |
sbot-api.js | changed |
modules/avatar-image.js | ||
---|---|---|
@@ -26,9 +26,10 @@ | ||
26 | 26 | |
27 | 27 | var last = 0 |
28 | 28 | |
29 | 29 | //blah blah |
30 | -setTimeout(function () { | |
30 | +exports.connection_status = function (err) { | |
31 | + if (err) return | |
31 | 32 | pull( |
32 | 33 | sbot_query({ |
33 | 34 | query: [{ |
34 | 35 | $filter: { |
@@ -70,9 +71,9 @@ | ||
70 | 71 | avatars[a.id] = a |
71 | 72 | |
72 | 73 | }) |
73 | 74 | ) |
74 | -}) | |
75 | +} | |
75 | 76 | |
76 | 77 | exports.avatar_image = function (author, classes) { |
77 | 78 | classes = classes || '' |
78 | 79 | if(classes && 'string' === typeof classes) classes = '.avatar--'+classes |
sbot-api.js | ||
---|---|---|
@@ -117,9 +117,9 @@ | ||
117 | 117 | return sbot.createUserStream(opts) |
118 | 118 | }), |
119 | 119 | sbot_get: rec.async(function (key, cb) { |
120 | 120 | if(CACHE[key]) cb(null, CACHE[key]) |
121 | - sbot.get(key, function (err, value) { | |
121 | + else sbot.get(key, function (err, value) { | |
122 | 122 | if(err) return cb(err) |
123 | 123 | cb(null, CACHE[key] = value) |
124 | 124 | }) |
125 | 125 | }), |
Built with git-ssb-web