diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2019-08-27 12:17:41 -0700 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2019-08-27 12:17:41 -0700 |
commit | 4be893165b9747520a03c43fa0c92bd9f823ebbb (patch) | |
tree | 3bc11e6e433a4b2a9bc956ed584e07c151dc24f4 | |
parent | 44097bb3a8ed88e414eda8c62a390034e9c83cbd (diff) | |
download | patchfoo-4be893165b9747520a03c43fa0c92bd9f823ebbb.tar.gz patchfoo-4be893165b9747520a03c43fa0c92bd9f823ebbb.zip |
/new: hide impossibly new messages
-rw-r--r-- | lib/serve.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/serve.js b/lib/serve.js index 64c96df..7e0ee26 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -527,8 +527,10 @@ Serve.prototype.new = function (ext) { var q = self.query var latest = (/latest=([^;]*)/.exec(self.req.headers.cookie) || [])[1] var limit = Number(q.limit || self.conf.newLimit || 500) + var now = Date.now() var opts = { - gt: Number(q.gt) || Number(latest) || Date.now(), + gt: Number(q.gt) || Number(latest) || now, + lte: now, limit: limit } |