mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
feat: scheduled topics (#9399)
* feat: scheduled topics * refactor: linting fixes * fix: tests * fix(test): race condition * fix: make a single request
This commit is contained in:
@@ -25,8 +25,8 @@ define('forum/topic/posts', [
|
||||
data.loggedIn = !!app.user.uid;
|
||||
data.privileges = ajaxify.data.privileges;
|
||||
|
||||
// prevent timeago in future by setting timestamp to 1 sec behind now
|
||||
data.posts[0].timestamp = Date.now() - 1000;
|
||||
// if not a scheduled topic, prevent timeago in future by setting timestamp to 1 sec behind now
|
||||
data.posts[0].timestamp = data.posts[0].topic.scheduled ? data.posts[0].timestamp : Date.now() - 1000;
|
||||
data.posts[0].timestampISO = utils.toISOString(data.posts[0].timestamp);
|
||||
|
||||
Posts.modifyPostsByPrivileges(data.posts);
|
||||
|
||||
Reference in New Issue
Block a user