git ssb

1+

punkmonk.termux / mvd



forked from ev / mvd

Commit b39e6bdb22180e6de03344b285238d49ec5ed7c1

throw err if no avatar

Ev Bogue committed on 6/25/2018, 2:33:28 PM
Parent: e1c58a0d0b79ef620830a1e5a77bb358200dc605

Files changed

avatar.jschanged
avatar.jsView
@@ -15,8 +15,9 @@
1515
1616 var avatarname = h('span', key.substring(0, 10))
1717
1818 avatar(sbot, id, key, function (err, data) {
19+ if (err) throw err
1920 if (data.name) {
2021 if (data.name[0] != '@') {
2122 var name = '@' + data.name
2223 } else {
@@ -33,8 +34,9 @@
3334 module.exports.image = function (key) {
3435 var img = visualize(new Buffer(key.substring(1), 'base64'), 256)
3536
3637 avatar(sbot, id, key, function (err, data) {
38+ if (err) throw err
3739 if (data.image) {
3840 localStorage[key + 'image'] = data.image
3941 img.src = config.blobsUrl + data.image
4042 }

Built with git-ssb-web