mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 06:56:18 +02:00
fix: conflicts
This commit is contained in:
@@ -39,7 +39,18 @@ module.exports = function (Topics) {
|
||||
if (!isAdminOrMod) {
|
||||
throw new Error('[[error:no-privileges]]');
|
||||
}
|
||||
const tid = await Topics.create({ uid: postData.uid, title: title, cid: cid });
|
||||
|
||||
const params = {
|
||||
uid: postData.uid,
|
||||
title: title,
|
||||
cid: cid,
|
||||
};
|
||||
const result = await plugins.hooks.fire('filter:topic.fork', {
|
||||
params: params,
|
||||
tid: postData.tid,
|
||||
});
|
||||
|
||||
const tid = await Topics.create(result.params);
|
||||
await Topics.updateTopicBookmarks(fromTid, pids);
|
||||
|
||||
await async.eachSeries(pids, async function (pid) {
|
||||
|
||||
@@ -45,11 +45,16 @@ module.exports = function (Topics) {
|
||||
|
||||
async function createNewTopic(title, oldestTid) {
|
||||
const topicData = await Topics.getTopicFields(oldestTid, ['uid', 'cid']);
|
||||
const tid = await Topics.create({
|
||||
const params = {
|
||||
uid: topicData.uid,
|
||||
cid: topicData.cid,
|
||||
title: title,
|
||||
};
|
||||
const result = await plugins.hooks.fire('filter:topic.mergeCreateNewTopic', {
|
||||
oldestTid: oldestTid,
|
||||
params: params,
|
||||
});
|
||||
const tid = await Topics.create(result.params);
|
||||
return tid;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user