mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
feat(topic-events): work in progress topic events logic and client-side implementation
This commit is contained in:
@@ -63,6 +63,12 @@ exports.doTopicAction = async function (action, event, caller, { tids }) {
|
||||
};
|
||||
|
||||
async function logTopicAction(action, req, tid, title) {
|
||||
// No 'purge' topic event (since topic is now gone)
|
||||
if (action !== 'purge') {
|
||||
await topics.events.log(tid, { type: action });
|
||||
}
|
||||
|
||||
// Only log certain actions to system event log
|
||||
var actionsToLog = ['delete', 'restore', 'purge'];
|
||||
if (!actionsToLog.includes(action)) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user