feat(topic-events): work in progress topic events logic and client-side implementation

This commit is contained in:
Julian Lam
2021-01-03 12:44:20 -05:00
parent faf5960373
commit ab2e1ecb40
7 changed files with 149 additions and 1 deletions

View File

@@ -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;