git ssb

0+

Dominic / yap-patch



Tree: 76a136d4fbdd78dab9a7b6f40385a810d6512d86

Files: 76a136d4fbdd78dab9a7b6f40385a810d6512d86 / backlinks.js

502 bytesRaw
1var pull = require('pull-stream')
2
3module.exports = function (sbot) {
4 return function (opts, apply) {
5 return function (cb) {
6 pull(
7 sbot.links({dest: opts.id, rel: 'mentions', values: true}),
8 pull.collect(function (err, ary) {
9 cb(null, ['div.BackLinks'].concat(ary.filter(function (e) {
10 return e.value.content.type != 'vote'
11 }).map(function (e) {
12 return apply('/patch/messageLink', e)
13 })))
14 })
15 )
16 }
17 }
18}
19

Built with git-ssb-web