git ssb

7+

dinoworm ๐Ÿ› / patchcore



Tree: 8e5d3ee4715c946c3cd8fb59f953ff358997b396

Files: 8e5d3ee4715c946c3cd8fb59f953ff358997b396 / feed / pull / public.js

532 bytesRaw
1const nest = require('depnest')
2var pull = require('pull-stream')
3
4exports.gives = nest('feed.pull.public')
5exports.needs = nest({
6 'sbot.pull.feed': 'first',
7 'message.sync.isBlocked': 'first',
8})
9
10exports.create = function (api) {
11 return nest('feed.pull.public', (opts) => {
12 // handle last item passed in as lt
13 opts.lt = (opts.lt && opts.lt.value)
14 ? opts.lt.value.timestamp
15 : opts.lt
16
17 return pull(
18 api.sbot.pull.feed(opts),
19 pull.filter(msg => !api.message.sync.isBlocked(msg))
20 )
21 })
22}
23

Built with git-ssb-web