Files: 66be95f3a931e6fd23354e931d1a9f2029748f97 / 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