git ssb

7+

dinoworm 🐛 / patchcore



Commit a959612185d373132b8891bcf18328d98c8a6bc0

fix feed.pull.channel index selection

see ssbc/patchwork#556
Matt McKegg committed on 6/14/2017, 5:06:03 AM
Parent: 97c748723f07a39c9848a6539e7c3de0c58d2462

Files changed

feed/pull/channel.jschanged
feed/pull/channel.jsView
@@ -10,18 +10,22 @@
1010 return nest('feed.pull.channel', function (channel) {
1111 if (typeof channel !== 'string') throw new Error('a channel name be specified')
1212
1313 return function (opts) {
14- var filter = {dest: `#${channel}`}
15-
16- // HACK: handle lt
17- if (opts.lt != null) {
18- filter.timestamp = {$lt: opts.lt, $gte: 0}
19- delete opts.lt
14 + var filter = {
15 + dest: `#${channel}`,
16 + timestamp: opts.lt
17 + ? {$lt: opts.lt, $gt: 0}
18 + : {$gt: 0}
2019 }
2120
22- return api.sbot.pull.backlinks(extend(opts, {query: [
23- {$filter: filter}
24- ]}))
21 + delete opts.lt
22 +
23 + return api.sbot.pull.backlinks(extend(opts, {
24 + index: 'DTS', // HACK: force index since flumeview-query is choosing the wrong one
25 + query: [
26 + {$filter: filter}
27 + ]
28 + }))
2529 }
2630 })
2731 }

Built with git-ssb-web