Files: 370bf616c2c19236893d5d9a0c7dce4001f1d176 / sbot / hops.js
322 bytesRaw
1 | module.exports = function (ssb, config) { |
2 | return function getHops ({from, to}, cb) { |
3 | ssb.friends.hops(from, (err, result) => { |
4 | if (err) return cb(err) |
5 | ssb.friends.hops(to, (err, reverseResult) => { |
6 | if (err) return cb(err) |
7 | cb(null, [result[to], reverseResult[from]]) |
8 | }) |
9 | }) |
10 | } |
11 | } |
12 |
Built with git-ssb-web