Files: 770fe5e2a3d5973a5c9b7d0945b214c3b2ea6793 / lib / depject / profile / async / avatar.js
380 bytesRaw
1 | const nest = require('depnest') |
2 | const { onceTrue } = require('mutant') |
3 | |
4 | exports.needs = nest({ |
5 | 'sbot.obs.connection': 'first' |
6 | }) |
7 | |
8 | exports.gives = nest('profile.async.avatar') |
9 | |
10 | exports.create = function (api) { |
11 | return nest('profile.async.avatar', function (id, cb) { |
12 | onceTrue(api.sbot.obs.connection, sbot => { |
13 | sbot.patchwork.profile.avatar({ id }, cb) |
14 | }) |
15 | }) |
16 | } |
17 |
Built with git-ssb-web