From 6a822f729d6114611d8e9c2287049a549d68fc10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 4 May 2017 13:19:28 -0400 Subject: [PATCH] add timestamp to topic edit hook --- src/posts/edit.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/posts/edit.js b/src/posts/edit.js index 8b48e6835e..99cc8e1692 100644 --- a/src/posts/edit.js +++ b/src/posts/edit.js @@ -85,7 +85,7 @@ module.exports = function (Posts) { async.parallel({ topic: function (next) { - topics.getTopicFields(tid, ['cid', 'title'], next); + topics.getTopicFields(tid, ['cid', 'title', 'timestamp'], next); }, isMain: function (next) { Posts.isMain(data.pid, next); @@ -136,6 +136,7 @@ module.exports = function (Posts) { function (tags, next) { topicData.tags = data.tags; topicData.oldTitle = results.topic.title; + topicData.timestamp = results.topic.timestamp; plugins.fireHook('action:topic.edit', { topic: topicData, uid: data.uid }); next(null, { tid: tid,