Skip to content

Node.js based forum software built for the modern web

fire topic edit action after topic is saved

barisusaklic29dcc0ec9ef
diff --git a/src/postTools.js b/src/postTools.js
index 103c82ee4b..e308332abe 100644
--- a/src/postTools.js
+++ b/src/postTools.js
@@ -66,11 +66,12 @@ var winston = require('winston'),
if (options.topic_thumb) {
topicData.thumb = options.topic_thumb;
}
- db.setObject('topic:' + tid, topicData);
- topics.updateTags(tid, options.tags);
+ db.setObject('topic:' + tid, topicData, function(err) {
+ plugins.fireHook('action:topic.edit', tid);
+ });
- plugins.fireHook('action:topic.edit', tid);
+ topics.updateTags(tid, options.tags);
}
plugins.fireHook('action:post.edit', postData);