mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
feat: #10018 , wip
This commit is contained in:
@@ -52,6 +52,7 @@
|
|||||||
"moved-from-by": "Moved from %1 by",
|
"moved-from-by": "Moved from %1 by",
|
||||||
"queued-by": "Post queued for approval →",
|
"queued-by": "Post queued for approval →",
|
||||||
"backlink": "Referenced by",
|
"backlink": "Referenced by",
|
||||||
|
"forked-by": "Forked by",
|
||||||
|
|
||||||
"bookmark_instructions" : "Click here to return to the last read post in this thread.",
|
"bookmark_instructions" : "Click here to return to the last read post in this thread.",
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,10 @@ Events._types = {
|
|||||||
icon: 'fa-link',
|
icon: 'fa-link',
|
||||||
text: '[[topic:backlink]]',
|
text: '[[topic:backlink]]',
|
||||||
},
|
},
|
||||||
|
fork: {
|
||||||
|
icon: 'fa-code-fork',
|
||||||
|
text: '[[topic:forked-by]]'
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
Events.init = async () => {
|
Events.init = async () => {
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ module.exports = function (Topics) {
|
|||||||
downvotes: postData.downvotes,
|
downvotes: postData.downvotes,
|
||||||
}),
|
}),
|
||||||
db.sortedSetsAdd(['topics:votes', `cid:${cid}:tids:votes`], postData.votes, tid),
|
db.sortedSetsAdd(['topics:votes', `cid:${cid}:tids:votes`], postData.votes, tid),
|
||||||
|
Topics.events.log(fromTid, { type: 'fork', uid })
|
||||||
]);
|
]);
|
||||||
|
|
||||||
plugins.hooks.fire('action:topic.fork', { tid: tid, fromTid: fromTid, uid: uid });
|
plugins.hooks.fire('action:topic.fork', { tid: tid, fromTid: fromTid, uid: uid });
|
||||||
|
|||||||
Reference in New Issue
Block a user