mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-05 15:20:39 +01:00
feat: #12935, show 'shared this to x' in topic event when moving topics out of cid -1
This commit is contained in:
@@ -66,6 +66,8 @@
|
||||
"user-restored-topic-on": "%1 restored this topic on %2",
|
||||
"user-moved-topic-from-ago": "%1 moved this topic from %2 %3",
|
||||
"user-moved-topic-from-on": "%1 moved this topic from %2 on %3",
|
||||
"user-shared-topic-ago": "%1 shared this topic %2",
|
||||
"user-shared-topic-on": "%1 shared this topic on %2",
|
||||
"user-queued-post-ago": "%1 <a href=\"%2\">queued</a> post for approval %3",
|
||||
"user-queued-post-on": "%1 <a href=\"%2\">queued</a> post for approval on %3",
|
||||
"user-referenced-topic-ago": "%1 <a href=\"%2\">referenced</a> this topic %3",
|
||||
|
||||
@@ -56,6 +56,10 @@ Events._types = {
|
||||
icon: 'fa-arrow-circle-right',
|
||||
translation: async (event, language) => translateEventArgs(event, language, 'topic:user-moved-topic-from', renderUser(event), `${event.fromCategory.name}`, renderTimeago(event)),
|
||||
},
|
||||
share: {
|
||||
icon: 'fa-share-alt',
|
||||
translation: async (event, language) => translateEventArgs(event, language, 'topic:user-shared-topic', renderUser(event), renderTimeago(event)),
|
||||
},
|
||||
'post-queue': {
|
||||
icon: 'fa-history',
|
||||
translation: async (event, language) => translateEventArgs(event, language, 'topic:user-queued-post', renderUser(event), `${relative_path}${event.href}`, renderTimeago(event)),
|
||||
|
||||
@@ -283,7 +283,7 @@ module.exports = function (Topics) {
|
||||
oldCid: oldCid,
|
||||
}),
|
||||
Topics.updateCategoryTagsCount([oldCid, cid], tags),
|
||||
Topics.events.log(tid, { type: 'move', uid: data.uid, fromCid: oldCid }),
|
||||
Topics.events.log(tid, { type: oldCid === -1 ? 'share' : 'move', uid: data.uid, fromCid: oldCid }),
|
||||
]);
|
||||
|
||||
// Update entry in recent topics zset — must come after hash update
|
||||
|
||||
Reference in New Issue
Block a user