From 4be893165b9747520a03c43fa0c92bd9f823ebbb Mon Sep 17 00:00:00 2001 From: cel Date: Tue, 27 Aug 2019 12:17:41 -0700 Subject: /new: hide impossibly new messages --- lib/serve.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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 } -- cgit v1.2.3