Commit c38545a2f64b06e7150cd79d548831b8b753c405
bump ssb-private, use feed.pull.private from patchcore
Matt McKegg committed on 6/14/2017, 3:39:28 AMParent: 0c32ba4ecf1c98ab797d92daa8ee0bfa0f1f4fa5
Files changed
modules/feed/pull/private.js | deleted |
package.json | changed |
modules/feed/pull/private.js | ||
---|---|---|
@@ -1,39 +1,0 @@ | ||
1 | -const pull = require('pull-stream') | |
2 | -const nest = require('depnest') | |
3 | -const defer = require('pull-defer') | |
4 | -const onceTrue = require('mutant/once-true') | |
5 | - | |
6 | -exports.gives = nest('feed.pull.private') | |
7 | -exports.needs = nest({ | |
8 | - 'sbot.obs.connection': 'first' | |
9 | -}) | |
10 | - | |
11 | -exports.create = function (api) { | |
12 | - return nest('feed.pull.private', function (opts) { | |
13 | - // HACK: needed to select correct index and handle lt | |
14 | - | |
15 | - opts.query = [ | |
16 | - {$filter: { | |
17 | - timestamp: opts.lt | |
18 | - ? {$lt: opts.lt} | |
19 | - : {$gt: 0} | |
20 | - }} | |
21 | - ] | |
22 | - | |
23 | - delete opts.lt | |
24 | - | |
25 | - return StreamWhenConnected(api.sbot.obs.connection, (sbot) => { | |
26 | - return pull( | |
27 | - sbot.private.read(opts) | |
28 | - ) | |
29 | - }) | |
30 | - }) | |
31 | -} | |
32 | - | |
33 | -function StreamWhenConnected (connection, fn) { | |
34 | - var stream = defer.source() | |
35 | - onceTrue(connection, function (connection) { | |
36 | - stream.resolve(fn(connection)) | |
37 | - }) | |
38 | - return stream | |
39 | -} |
package.json | ||
---|---|---|
@@ -28,9 +28,9 @@ | ||
28 | 28 | "micro-css": "^2.0.0", |
29 | 29 | "mutant": "^3.20.1", |
30 | 30 | "mutant-pull-reduce": "^1.1.0", |
31 | 31 | "obv": "0.0.1", |
32 | - "patchcore": "~1.0.2", | |
32 | + "patchcore": "~1.1.0", | |
33 | 33 | "patchwork-gatherings": "^1.0.2", |
34 | 34 | "pull-abortable": "^4.1.0", |
35 | 35 | "pull-defer": "^0.2.2", |
36 | 36 | "pull-file": "~1.0.0", |
@@ -52,9 +52,9 @@ | ||
52 | 52 | "ssb-friends": "^2.0.3", |
53 | 53 | "ssb-keys": "~7.0.9", |
54 | 54 | "ssb-mentions": "^0.4.0", |
55 | 55 | "ssb-msgs": "^5.2.0", |
56 | - "ssb-private": "0.1.1", | |
56 | + "ssb-private": "0.1.2", | |
57 | 57 | "ssb-query": "^1.0.0", |
58 | 58 | "ssb-ref": "~2.7.1", |
59 | 59 | "ssb-sort": "^1.0.0", |
60 | 60 | "statistics": "^3.3.0", |
Built with git-ssb-web