Files: 53223b8604d4abb25d4300575f28f0076460a02e / feed / pull / profile.js
631 bytesRaw
1 | const nest = require('depnest') |
2 | const extend = require('xtend') |
3 | const pull = require('pull-stream') |
4 | |
5 | exports.gives = nest('feed.pull.profile') |
6 | exports.needs = nest('sbot.pull.userFeed', 'first') |
7 | exports.create = function (api) { |
8 | return nest('feed.pull.profile', (id) => { |
9 | // handle last item passed in as lt |
10 | return function (opts) { |
11 | opts = extend(opts, { |
12 | id, lt: (opts.lt && opts.lt.value) ? opts.lt.value.sequence : opts.lt |
13 | }) |
14 | return pull( |
15 | api.sbot.pull.userFeed(opts), |
16 | pull.filter(msg => { |
17 | return typeof msg.value.content !== 'string' |
18 | }) |
19 | ) |
20 | } |
21 | }) |
22 | } |
23 |
Built with git-ssb-web