git ssb

7+

dinoworm ๐Ÿ› / patchcore



Tree: 53223b8604d4abb25d4300575f28f0076460a02e

Files: 53223b8604d4abb25d4300575f28f0076460a02e / feed / pull / profile.js

631 bytesRaw
1const nest = require('depnest')
2const extend = require('xtend')
3const pull = require('pull-stream')
4
5exports.gives = nest('feed.pull.profile')
6exports.needs = nest('sbot.pull.userFeed', 'first')
7exports.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