git ssb

7+

dinoworm 🐛 / patchcore



Commit 05e3f329df1f7bdbff0e2f0846fe6718a6df21fc

feed.pull: check timestamp is a number before using

Matt McKegg committed on 6/21/2017, 4:19:39 AM
Parent: d06c60e3b13b5795e7acad4aff8901f5039efb83

Files changed

feed/pull/channel.jschanged
feed/pull/mentions.jschanged
feed/pull/private.jschanged
feed/pull/channel.jsView
@@ -20,9 +20,9 @@
2020
2121 var filter = {
2222 dest: `#${channel}`,
2323 value: {
24- timestamp: lt ? {$lt: lt, $gt: 0} : {$gt: 0}
24 + timestamp: typeof lt === 'number' ? {$lt: lt, $gt: 0} : {$gt: 0}
2525 }
2626 }
2727
2828 return api.sbot.pull.backlinks(extend(opts, {
feed/pull/mentions.jsView
@@ -23,9 +23,9 @@
2323 lt: undefined,
2424 query: [
2525 {$filter: {
2626 dest: id,
27- timestamp: lt ? {$lt: lt, $gt: 0} : {$gt: 0}
27 + timestamp: typeof lt === 'number' ? {$lt: lt, $gt: 0} : {$gt: 0}
2828 }}
2929 ]
3030 })
3131
feed/pull/private.jsView
@@ -18,9 +18,9 @@
1818
1919 // HACK: needed to select correct index and handle lt
2020 opts.query = [
2121 {$filter: {
22- timestamp: lt
22 + timestamp: typeof lt === 'number'
2323 ? {$lt: lt, $gt: 0}
2424 : {$gt: 0}
2525 }}
2626 ]

Built with git-ssb-web