git ssb

7+

dinoworm 🐛 / patchcore



Commit 73ce52087fc4eb16ae6fef1818817c6f2fcd5a52

whoops, better opts.lt.value.timestamp check

Matt McKegg committed on 6/21/2017, 1:22:40 AM
Parent: 54d1529773b8b8bc33c3529ca12237ddccb78c32

Files changed

feed/pull/channel.jschanged
feed/pull/mentions.jschanged
feed/pull/private.jschanged
feed/pull/profile.jschanged
feed/pull/public.jschanged
feed/pull/channel.jsView
@@ -11,9 +11,9 @@
1111 if (typeof channel !== 'string') throw new Error('a channel name be specified')
1212
1313 return function (opts) {
1414 // handle last item passed in as lt
15- var lt = (opts.lt && typeof opts.lt === 'object')
15 + var lt = (opts.lt && opts.lt.value)
1616 ? opts.lt.value.timestamp
1717 : opts.lt
1818
1919 delete opts.lt
feed/pull/mentions.jsView
@@ -14,9 +14,9 @@
1414 if (!ref.isFeed(id)) throw new Error('a feed id must be specified')
1515
1616 return function getStream (opts) {
1717 // handle last item passed in as lt
18- var lt = (opts.lt && typeof opts.lt === 'object')
18 + var lt = (opts.lt && opts.lt.value)
1919 ? opts.lt.timestamp
2020 : opts.lt
2121
2222 opts = extend(opts, {
feed/pull/private.jsView
@@ -10,9 +10,9 @@
1010
1111 exports.create = function (api) {
1212 return nest('feed.pull.private', function (opts) {
1313 // handle last item passed in as lt
14- var lt = (opts.lt && typeof opts.lt === 'object')
14 + var lt = (opts.lt && opts.lt.value)
1515 ? opts.lt.timestamp
1616 : opts.lt
1717 delete opts.lt
1818
feed/pull/profile.jsView
@@ -8,9 +8,9 @@
88 return nest('feed.pull.profile', (id) => {
99 // handle last item passed in as lt
1010 return function (opts) {
1111 opts = extend(opts, {
12- id, lt: (opts.lt && typeof opts.lt === 'object') ? opts.lt.value.sequence : opts.lt
12 + id, lt: (opts.lt && opts.lt.value) ? opts.lt.value.sequence : opts.lt
1313 })
1414 return pull(
1515 api.sbot.pull.userFeed(opts),
1616 pull.filter(msg => {
feed/pull/public.jsView
@@ -4,9 +4,9 @@
44 exports.needs = nest('sbot.pull.feed', 'first')
55 exports.create = function (api) {
66 return nest('feed.pull.public', (opts) => {
77 // handle last item passed in as lt
8- opts.lt = (opts.lt && typeof opts.lt === 'object')
8 + opts.lt = (opts.lt && opts.lt.value)
99 ? opts.lt.value.timestamp
1010 : opts.lt
1111 return api.sbot.pull.feed(opts)
1212 })

Built with git-ssb-web