NotificationLogEntry

final class NotificationLogEntry : Model, @unchecked Sendable

A single notification event that was pushed to one or more users’ notification websockets.

Named NotificationLogEntry rather than Notification to avoid colliding with Foundation.Notification (NotificationCenter’s type)–that name is ambiguous outside this module (e.g. in AppTests), where it silently resolves to the wrong type instead of raising a redeclaration error.

One row is written per fan-out event, not per recipient–who received it is recorded separately in NotificationRecipient, so a broadcast notification (e.g. an .announcement) sent to every user only stores its content once. The row’s id doubles as the notificationID included in the live SocketNotificationData push, letting clients de-dupe a live push against a later fetch of GET /api/v3/notification/log.

Properties

Initialization