From f0f30041f58f43038967e32476de3878e17943ca Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 24 Apr 2018 10:09:40 -0400 Subject: [PATCH] re: #6408 --- public/language/en-GB/topic.json | 4 +++- public/src/client/topic/diffs.js | 2 ++ src/posts/diffs.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/public/language/en-GB/topic.json b/public/language/en-GB/topic.json index 371300e38b..be64432767 100644 --- a/public/language/en-GB/topic.json +++ b/public/language/en-GB/topic.json @@ -150,5 +150,7 @@ "diffs.title": "Post Edit History", "diffs.description": "This post has %1 revisions. Click one of the revisions below to see the post content at that point in time.", - "diffs.no-revisions-description": "This post has %1 revisions." + "diffs.no-revisions-description": "This post has %1 revisions.", + "diffs.current-revision": "current revision", + "diffs.original-revision": "original revision" } diff --git a/public/src/client/topic/diffs.js b/public/src/client/topic/diffs.js index be7b5b0731..6d25d1d4e3 100644 --- a/public/src/client/topic/diffs.js +++ b/public/src/client/topic/diffs.js @@ -15,6 +15,8 @@ define('forum/topic/diffs', ['forum/topic/images', 'benchpress', 'translator'], return app.alertError(err.message); } + timestamps.unshift(Date.now()); + Benchpress.parse('partials/modals/post_history', { diffs: timestamps.map(function (timestamp) { timestamp = parseInt(timestamp, 10); diff --git a/src/posts/diffs.js b/src/posts/diffs.js index 782115b74b..6efaabcfb9 100644 --- a/src/posts/diffs.js +++ b/src/posts/diffs.js @@ -27,7 +27,7 @@ Diffs.get = function (pid, since, callback) { function (timestamps, next) { // Pass those made after `since`, and create keys const keys = timestamps.filter(function (timestamp) { - return (parseInt(timestamp, 10) || 0) > since; + return (parseInt(timestamp, 10) || 0) >= since; }).map(function (timestamp) { return 'diff:' + pid + '.' + timestamp; });