diff --git a/public/language/en-GB/topic.json b/public/language/en-GB/topic.json index ceb9b43d42..fc7984f6de 100644 --- a/public/language/en-GB/topic.json +++ b/public/language/en-GB/topic.json @@ -52,6 +52,7 @@ "moved-from-by": "Moved from %1 by", "queued-by": "Post queued for approval →", "backlink": "Referenced by", + "forked-by": "Forked by", "bookmark_instructions" : "Click here to return to the last read post in this thread.", diff --git a/src/topics/events.js b/src/topics/events.js index dcbf414e27..3227c76868 100644 --- a/src/topics/events.js +++ b/src/topics/events.js @@ -58,6 +58,10 @@ Events._types = { icon: 'fa-link', text: '[[topic:backlink]]', }, + fork: { + icon: 'fa-code-fork', + text: '[[topic:forked-by]]' + }, }; Events.init = async () => { diff --git a/src/topics/fork.js b/src/topics/fork.js index aa16168c87..56d4161b80 100644 --- a/src/topics/fork.js +++ b/src/topics/fork.js @@ -70,6 +70,7 @@ module.exports = function (Topics) { downvotes: postData.downvotes, }), 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 });