var pull = require('pull-stream') module.exports = function (sbot) { return function (opts, apply) { return function (cb) { pull( sbot.links({dest: opts.id, rel: 'mentions', values: true}), pull.collect(function (err, ary) { cb(null, ['div.BackLinks'].concat(ary.filter(function (e) { return e.value.content.type != 'vote' }).map(function (e) { return apply('/patch/messageLink', e) }))) }) ) } } }