Files: 40aa5761d29866aa4ab08ff139a33262cbc14177 / book / pull / getAll.js
582 bytesRaw
1 | const pull = require('pull-stream') |
2 | const nest = require('depnest') |
3 | |
4 | exports.gives = nest({ |
5 | 'book.pull.getAll': true |
6 | // this style is easier to search for IMO |
7 | }) |
8 | |
9 | exports.needs = nest({ |
10 | 'sbot.pull.messagesByType': 'first' |
11 | }) |
12 | |
13 | exports.create = function (api) { |
14 | return nest({ 'book.pull.getAll': getAll }) |
15 | |
16 | function getAll() { |
17 | // we can trust this returns a pull stream alread because it's sbot.pull.* |
18 | return api.sbot.pull.messagesByType({ type: 'bookclub', fillCache: true, |
19 | keys: true, reverse: true, live: true }) |
20 | } |
21 | } |
22 |
Built with git-ssb-web