mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-07-20 21:14:30 -05:00
Neither the v1 nor the v2 admin handlers called events.DispatchPending after commit, so events queued via DispatchOnCommit were silently dropped: admin-created users never fired user.created (no webhook, notification or audit entry) and mode=now user deletion dropped the cascaded project.deleted events. Each dropped queue also leaked an entry in the pendingEvents map keyed on the dead session. Dispatch after commit, clean up on rollback, and thread the real request context through the v2 handlers so request metadata flows onto the events.