substanced
substanced copied to clipboard
Send an undo event when an undo is performed
And subscribe to it within the auditlog package (include the transaction id).
The transaction package does not emit events before or after commit; you have to register a before/after commit hook. We could change pyramid_tm so that it registered a before commit hook that would write the undo data to the audit log, but then we'd need to change pyramid_tm to accept some sort of after-commit-hook function, and it'd be a lot better if the transaction package just itself emitted events in those cases and Substance D itself subscribed to them.