refactor(topic-events): fire topic event logging in topics/tools instead, pass uid into payload

This commit is contained in:
Julian Lam
2021-01-04 15:33:14 -05:00
parent ab2e1ecb40
commit 425eca145b
2 changed files with 3 additions and 5 deletions

View File

@@ -63,11 +63,6 @@ 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)) {