mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-04-24 14:15:18 +00:00
Add NotificationCreatedEvent that fires automatically when a DatabaseNotification is inserted, using XORM's AfterInsertProcessor interface. The AfterInsert hook dispatches the event after the row is persisted, without callers needing to manage DispatchOnCommit or DispatchPending. The WebSocket listener subscribes to this event, reloads the notification from the database (ensuring accurate timestamps), and pushes it to connected clients subscribed to the notification.created event. Dispatch errors are logged rather than propagated since the DB notification is already committed at that point.