Files: e440f8c92caaa6857bccee89bb2de11d376d29a3 / backlinks.js
502 bytesRaw
1 | var pull = require('pull-stream') |
2 | |
3 | module.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