Commit 7a5d22e2c340128aadbbf7062bc20e4703bc3d50
Omit revision with timestamp equal to query start
cel committed on 12/14/2019, 6:34:32 AMParent: 6b5ec2095160533416cd20a72f45e53f40849103
Files changed
bin.js | changed |
bin.js | |||
---|---|---|---|
@@ -240,8 +240,9 @@ | |||
240 | 240 … | var rvcontinue, rvdone | |
241 | 241 … | var rvstart = pageInfo.latestRevTs | |
242 | 242 … | var prevId = pageInfo.latestMsgId | |
243 | 243 … | var aborted | |
244 … | + var first = true | ||
244 | 245 … | var revisions = pull( | |
245 | 246 … | function (abort, cb) { | |
246 | 247 … | if (aborted = abort) return cb(abort) | |
247 | 248 … | if (rvdone) return cb(true) | |
@@ -300,8 +301,16 @@ | |||
300 | 301 … | }) | |
301 | 302 … | }, | |
302 | 303 … | pull.flatten(), | |
303 | 304 … | ||
305 … | + pull.filter(function (rev) { | ||
306 … | + if (rev.timestamp === rvstart && first) { | ||
307 … | + first = false | ||
308 … | + return false | ||
309 … | + } | ||
310 … | + return true | ||
311 … | + }), | ||
312 … | + | ||
304 | 313 … | pull.through(function (rev) { | |
305 | 314 … | if (!rev.slots) { | |
306 | 315 … | // old API does not use slots. | |
307 | 316 … | // Transform result to be forward-compatible. |
Built with git-ssb-web