mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-13 09:25:45 +01:00
fire action:topic.move after topic cid is changed
This commit is contained in:
@@ -183,13 +183,16 @@ var async = require('async'),
|
||||
|
||||
categories.moveRecentReplies(tid, oldCid, cid);
|
||||
|
||||
topics.setTopicField(tid, 'cid', cid, callback);
|
||||
|
||||
plugins.fireHook('action:topic.move', {
|
||||
tid: tid,
|
||||
fromCid: oldCid,
|
||||
toCid: cid,
|
||||
uid: uid
|
||||
topics.setTopicField(tid, 'cid', cid, function(err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
plugins.fireHook('action:topic.move', {
|
||||
tid: tid,
|
||||
fromCid: oldCid,
|
||||
toCid: cid,
|
||||
uid: uid
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user