mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
add timestamp to topic edit hook
This commit is contained in:
@@ -85,7 +85,7 @@ module.exports = function (Posts) {
|
|||||||
|
|
||||||
async.parallel({
|
async.parallel({
|
||||||
topic: function (next) {
|
topic: function (next) {
|
||||||
topics.getTopicFields(tid, ['cid', 'title'], next);
|
topics.getTopicFields(tid, ['cid', 'title', 'timestamp'], next);
|
||||||
},
|
},
|
||||||
isMain: function (next) {
|
isMain: function (next) {
|
||||||
Posts.isMain(data.pid, next);
|
Posts.isMain(data.pid, next);
|
||||||
@@ -136,6 +136,7 @@ module.exports = function (Posts) {
|
|||||||
function (tags, next) {
|
function (tags, next) {
|
||||||
topicData.tags = data.tags;
|
topicData.tags = data.tags;
|
||||||
topicData.oldTitle = results.topic.title;
|
topicData.oldTitle = results.topic.title;
|
||||||
|
topicData.timestamp = results.topic.timestamp;
|
||||||
plugins.fireHook('action:topic.edit', { topic: topicData, uid: data.uid });
|
plugins.fireHook('action:topic.edit', { topic: topicData, uid: data.uid });
|
||||||
next(null, {
|
next(null, {
|
||||||
tid: tid,
|
tid: tid,
|
||||||
|
|||||||
Reference in New Issue
Block a user