git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Commit c38545a2f64b06e7150cd79d548831b8b753c405

bump ssb-private, use feed.pull.private from patchcore

Matt McKegg committed on 6/14/2017, 3:39:28 AM
Parent: 0c32ba4ecf1c98ab797d92daa8ee0bfa0f1f4fa5

Files changed

modules/feed/pull/private.jsdeleted
package.jsonchanged
modules/feed/pull/private.jsView
@@ -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.jsonView
@@ -28,9 +28,9 @@
2828 "micro-css": "^2.0.0",
2929 "mutant": "^3.20.1",
3030 "mutant-pull-reduce": "^1.1.0",
3131 "obv": "0.0.1",
32- "patchcore": "~1.0.2",
32+ "patchcore": "~1.1.0",
3333 "patchwork-gatherings": "^1.0.2",
3434 "pull-abortable": "^4.1.0",
3535 "pull-defer": "^0.2.2",
3636 "pull-file": "~1.0.0",
@@ -52,9 +52,9 @@
5252 "ssb-friends": "^2.0.3",
5353 "ssb-keys": "~7.0.9",
5454 "ssb-mentions": "^0.4.0",
5555 "ssb-msgs": "^5.2.0",
56- "ssb-private": "0.1.1",
56+ "ssb-private": "0.1.2",
5757 "ssb-query": "^1.0.0",
5858 "ssb-ref": "~2.7.1",
5959 "ssb-sort": "^1.0.0",
6060 "statistics": "^3.3.0",

Built with git-ssb-web