git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Tree: 461fd4459a46469a272bb9fe6c369b1dd1c9323c

Files: 461fd4459a46469a272bb9fe6c369b1dd1c9323c / sbot / hops.js

322 bytesRaw
1module.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