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