Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit a953669

Browse files
Refactor to remove more references
1 parent 18699b1 commit a953669

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

lib/plugins/channel-feed.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,14 @@ exports.init = function (ssb) {
4545
channel = normalizeChannel(channel)
4646

4747
// use resume option if specified
48-
var rts = { $gt: 0 }
48+
let rts
4949
if (resume) {
5050
rts = reverse ? { $lt: resume } : { $gt: resume }
51+
} else {
52+
rts = { $gt: 0 }
5153
}
5254

55+
5356
var opts = {
5457
reverse,
5558
awaitReady: false,

lib/plugins/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,21 @@ for (var key in plugins) {
5454
}
5555

5656
exports.init = function (ssb, config) {
57-
var progress = Progress(ssb, config)
58-
var subscriptions = Subscriptions(ssb, config)
59-
var search = Search(ssb, config)
60-
var recentFeeds = RecentFeeds(ssb, config)
57+
var progress = Progress(ssb)
58+
var subscriptions = Subscriptions(ssb)
59+
var search = Search(ssb )
60+
var recentFeeds = RecentFeeds(ssb)
6161
var replicating = new Set()
6262

6363
var patchwork = {
64-
heartbeat: Heartbeat(ssb, config),
64+
heartbeat: Heartbeat(),
6565
subscriptions: subscriptions.stream,
6666
progress: progress.stream,
6767
recentFeeds: recentFeeds.stream,
6868
linearSearch: search.linear,
6969
privateSearch: search.privateLinear,
7070
getSubscriptions: subscriptions.get,
71-
liveBacklinks: LiveBacklinks(ssb, config),
71+
liveBacklinks: LiveBacklinks(ssb),
7272

7373
disconnect: function (opts, cb) {
7474
if (ref.isFeed(opts)) opts = { key: opts }

lib/plugins/likes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ exports.init = function (ssb) {
6363
var ids = new Set()
6464
var sync = false
6565
return pull(
66-
read({ dest, live: true, old: true }),
66+
read({ dest, live: true }),
6767
pull.map(msg => {
6868
if (msg.sync) {
6969
sync = true

0 commit comments

Comments
 (0)