Files: d3516ed7e732fa6234093e1b15a55b982a89c652 / 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