modules/avatar-image.jsView |
---|
1 | 1 | |
2 | 2 | var getAvatar = require('ssb-avatar') |
3 | 3 | var h = require('hyperscript') |
4 | 4 | var ref = require('ssb-ref') |
| 5 | +var path = require('path') |
5 | 6 | |
6 | 7 | var plugs = require('../plugs') |
7 | 8 | var sbot_query = plugs.first(exports.sbot_query = []) |
8 | 9 | var blob_url = require('../plugs').first(exports.blob_url = []) |
10 | 11 | var pull = require('pull-stream') |
11 | 12 | |
12 | 13 | var id = require('../keys').id |
13 | 14 | |
14 | | -var default_avatar = '&qjeAs8+uMXLlyovT4JnEpMwTNDx/QXHfOl2nv2u0VCM=.sha256' |
| 15 | +var default_avatar = path.join(__dirname, 'avatar_fallback.png') |
15 | 16 | |
16 | 17 | var avatars = AVATARS = {} |
17 | 18 | |
18 | 19 | function isFunction (f) { |
77 | 78 | exports.avatar_image = function (author, classes) { |
78 | 79 | classes = classes || '' |
79 | 80 | if(classes && 'string' === typeof classes) classes = '.avatar--'+classes |
80 | 81 | |
81 | | - var img = h('img'+classes, {src: blob_url(default_avatar)}) |
| 82 | + var img = h('img'+classes, {src: default_avatar}) |
82 | 83 | |
83 | 84 | |
84 | 85 | |
85 | 86 | |