Skip to content

Node.js based forum software built for the modern web

add timestamp to topic edit hook

Barış Soner Uşaklı6a822f729d61
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,